|
1 | | -from distutils.core import setup |
| 1 | +__authors__ = ["Pierre-Alexandre Fonta", "Christian O'Reilly"] |
| 2 | +__maintainer__ = "Pierre-Alexandre Fonta" |
| 3 | + |
2 | 4 | import os |
3 | 5 |
|
4 | | -PACKAGE = "nat" |
5 | | -NAME = "nat" |
6 | | -DESCRIPTION = open(os.path.join(os.path.dirname(__file__), "README.md")).read() |
7 | | -AUTHOR = "Christian O'Reilly, Pierre-Alexandre Fonta" |
8 | | -AUTHOR_EMAIL = "christian.oreilly@epfl.ch" |
9 | | -VERSION = "0.4.0" |
10 | | -REQUIRED = ["numpy", "parse", "metapub", "pyzotero", "GitPython", "pandas", |
11 | | - "biopython", "beautifulsoup4", "quantities", "wand", "scipy"] |
| 6 | +from setuptools import setup |
12 | 7 |
|
13 | | -def is_package(path): |
14 | | - return ( |
15 | | - os.path.isdir(path) and |
16 | | - os.path.isfile(os.path.join(path, '__init__.py')) |
17 | | - ) |
| 8 | +VERSION = "0.4.1" |
18 | 9 |
|
19 | | -def find_packages(path, base="" ): |
20 | | - """ Find all packages in path """ |
21 | | - packages = {} |
22 | | - for item in os.listdir(path): |
23 | | - dir = os.path.realpath(os.path.join(path, item)) |
24 | | - if is_package( dir ): |
25 | | - if base: |
26 | | - module_name = "%(base)s.%(item)s" % vars() |
27 | | - else: |
28 | | - module_name = item |
29 | | - packages[module_name] = dir |
30 | | - packages.update(find_packages(dir, module_name)) |
31 | | - return packages |
| 10 | +HERE = os.path.abspath(os.path.dirname(__file__)) |
32 | 11 |
|
33 | | -packages=find_packages(os.path.join(os.path.dirname(os.path.realpath(__file__)), ".")) |
| 12 | +# Get the long description from the README file. |
| 13 | +# Convert to rst with: pandoc --from=markdown --to=rst README.md -o README.rst. |
| 14 | +with open(os.path.join(HERE, "README.rst"), encoding="utf-8") as f: |
| 15 | + long_description = f.read() |
34 | 16 |
|
35 | 17 | setup( |
36 | | - name=NAME, |
37 | | - packages=packages.keys(), |
38 | | - package_dir=packages, |
39 | | - package_data={PACKAGE: ["additionsToOntologies.csv", "modelingDictionary.csv"]}, |
| 18 | + name="nat", |
40 | 19 | version=VERSION, |
41 | | - description=DESCRIPTION, |
42 | | - long_description=DESCRIPTION, |
43 | | - author=AUTHOR, |
44 | | - author_email=AUTHOR_EMAIL, |
45 | | - maintainer=AUTHOR, |
46 | | - maintainer_email=AUTHOR_EMAIL, |
47 | | - license='LICENSE.txt', |
48 | | - requires=REQUIRED, |
49 | | - install_requires=REQUIRED, |
50 | | - url="https://github.com/christian-oreilly/nat", |
51 | | - classifiers=["Development Status :: 3 - Alpha", |
52 | | - "Environment :: MacOS X", #"Environment :: Win32 (MS Windows)", |
53 | | - "Environment :: X11 Applications", |
54 | | - "Intended Audience :: Developers", |
55 | | - "Intended Audience :: Science/Research", |
56 | | - "License :: Free for non-commercial use", |
57 | | - "License :: OSI Approved :: GNU General Public License v3 (GPLv3)", |
58 | | - "Natural Language :: English", |
59 | | - "Programming Language :: Python :: 3.4", |
60 | | - "Topic :: Scientific/Engineering"]) |
| 20 | + description="Module to use the annotations created with NeuroCurator.", |
| 21 | + long_description=long_description, |
| 22 | + keywords="neuroscience annotation curation literature modeling parameters", |
| 23 | + url="https://github.com/BlueBrain/nat", |
| 24 | + author="Christian O'Reilly, Pierre-Alexandre Fonta", |
| 25 | + author_email="christian.oreilly@epfl.ch, pierre-alexandre.fonta@epfl.ch", |
| 26 | + # NB: 'If maintainer is provided, distutils lists it as the author in PKG-INFO'. |
| 27 | + # https://docs.python.org/3/distutils/setupscript.html#meta-data |
| 28 | + # maintainer="Pierre-Alexandre Fonta", |
| 29 | + # maintainer_email="pierre-alexandre@epfl.ch", |
| 30 | + license="GPLv3", |
| 31 | + packages=["nat"], |
| 32 | + python_requires=">=3", # unittest.mock needs Python 3.3+. |
| 33 | + install_requires=[ |
| 34 | + "beautifulsoup4", |
| 35 | + "gitpython", |
| 36 | + "lxml", |
| 37 | + "numpy", |
| 38 | + "pandas", |
| 39 | + "parse", |
| 40 | + "pyzotero", |
| 41 | + "quantities", |
| 42 | + "scipy", |
| 43 | + "wand" |
| 44 | + ], |
| 45 | + extras_require={ |
| 46 | + "test": ["pytest", "pytest-cov", "pytest-lazy-fixture", "pytest-mock"] |
| 47 | + }, |
| 48 | + package_data={ |
| 49 | + "nat": ["data/*.csv"] |
| 50 | + }, |
| 51 | + data_files=[("", ["LICENSE.txt"])], |
| 52 | + classifiers=[ |
| 53 | + "Development Status :: 3 - Alpha", |
| 54 | + "Intended Audience :: Science/Research", |
| 55 | + "Intended Audience :: Developers", |
| 56 | + "Topic :: Scientific/Engineering", |
| 57 | + "Topic :: Software Development :: Libraries :: Python Modules", |
| 58 | + "License :: OSI Approved :: GNU General Public License v3 (GPLv3)", |
| 59 | + "License :: Free for non-commercial use", |
| 60 | + "Programming Language :: Python :: 3 :: Only", |
| 61 | + "Operating System :: MacOS", |
| 62 | + "Operating System :: POSIX :: Linux", |
| 63 | + "Operating System :: Microsoft :: Windows", |
| 64 | + "Natural Language :: English" |
| 65 | + ] |
| 66 | +) |
0 commit comments