Skip to content

Commit 334f469

Browse files
committed
Convert setup.py to setup.cfg
1 parent d955366 commit 334f469

File tree

5 files changed

+36
-48
lines changed

5 files changed

+36
-48
lines changed

MANIFEST.in

Lines changed: 0 additions & 3 deletions
This file was deleted.

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ The package is also available on `conda-forge
2626

2727
To install from source, download the package, extract and type::
2828

29-
$ python setup.py install
29+
$ pip install .
3030

3131

3232
=======

pyproject.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[build-system]
2+
requires = ["setuptools"]
3+
build-backend = "setuptools.build_meta"

setup.cfg

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
[metadata]
2+
name = memory_profiler
3+
description = A module for monitoring memory usage of a python program
4+
long_description = file: README.rst
5+
version = attr: memory_profiler.__version__
6+
license = BSD
7+
license_files = COPYING
8+
author = Fabian Pedregosa
9+
author_email = f@bianp.net
10+
url = https://github.com/pythonprofilers/memory_profiler
11+
classifiers =
12+
Development Status :: 5 - Production/Stable
13+
Intended Audience :: Science/Research
14+
Intended Audience :: Developers
15+
License :: OSI Approved :: BSD License
16+
Programming Language :: Python
17+
Programming Language :: Python :: 3
18+
Topic :: Software Development
19+
Operating System :: POSIX
20+
Operating System :: Unix
21+
22+
[options]
23+
py_modules =
24+
memory_profiler
25+
mprof
26+
python_requires = >=3.4
27+
install_requires = psutil
28+
29+
[options.entry_points]
30+
console_scripts =
31+
mprof = mprof:main

setup.py

Lines changed: 1 addition & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,3 @@
1-
import re
21
from setuptools import setup
32

4-
5-
# https://packaging.python.org/guides/single-sourcing-package-version/
6-
def find_version(file_paths):
7-
with open(file_paths) as f:
8-
version_file = f.read()
9-
version_match = re.search(
10-
r"^__version__ = ['\"]([^'\"]*)['\"]", version_file, re.M
11-
)
12-
if version_match:
13-
return version_match.group(1)
14-
15-
16-
CLASSIFIERS = """\
17-
Development Status :: 5 - Production/Stable
18-
Intended Audience :: Science/Research
19-
Intended Audience :: Developers
20-
License :: OSI Approved :: BSD License
21-
Programming Language :: Python
22-
Programming Language :: Python :: 3
23-
Topic :: Software Development
24-
Operating System :: POSIX
25-
Operating System :: Unix
26-
27-
"""
28-
29-
30-
setup(
31-
name='memory_profiler',
32-
description='A module for monitoring memory usage of a python program',
33-
long_description=open('README.rst').read(),
34-
version=find_version("memory_profiler.py"),
35-
author='Fabian Pedregosa',
36-
author_email='f@bianp.net',
37-
url='https://github.com/pythonprofilers/memory_profiler',
38-
py_modules=['memory_profiler', 'mprof'],
39-
entry_points={
40-
'console_scripts': ['mprof = mprof:main'],
41-
},
42-
install_requires=['psutil'],
43-
python_requires='>=3.4',
44-
classifiers=[_f for _f in CLASSIFIERS.split('\n') if _f],
45-
license='BSD'
46-
)
3+
setup()

0 commit comments

Comments
 (0)