|
5 | 5 | https://github.com/pypa/sampleproject |
6 | 6 | """ |
7 | 7 |
|
8 | | -''' |
9 | | -to install in development mode, run the following code from command line |
10 | | -"python setup.py develop" |
11 | | -''' |
12 | | - |
13 | | -# Always prefer setuptools over distutils |
14 | | -from setuptools import setup, find_packages |
15 | | -# To use a consistent encoding |
| 8 | +import os |
16 | 9 | from codecs import open |
17 | | -from os import path |
| 10 | + |
| 11 | +from setuptools import find_packages, setup |
18 | 12 |
|
19 | 13 | import versioneer |
20 | 14 |
|
21 | | -here = path.abspath(path.dirname(__file__)) |
| 15 | +here = os.path.abspath(os.path.dirname(__file__)) |
| 16 | + |
| 17 | +# Dependencies. |
| 18 | +with open('requirements.txt') as f: |
| 19 | + requirements = f.readlines() |
| 20 | +install_requires = [t.strip() for t in requirements] |
22 | 21 |
|
23 | | -from pip.req import parse_requirements |
24 | | -install_reqs = parse_requirements('requirements.txt', session=False) |
25 | | -reqs = [str(ir.req) for ir in install_reqs] |
| 22 | +with open(os.path.join(here, 'README.md'), encoding='utf-8') as f: |
| 23 | + long_description = f.read() |
26 | 24 |
|
27 | | -# Get the long description from the relevant file |
28 | | -with open(path.join(here, 'README.md'), encoding='utf-8') as f: |
29 | | - long_description = f.read() |
30 | | -#long_description = "" |
31 | 25 | setup( |
32 | 26 | name='odm2api', |
33 | | - |
34 | | - # Versions should comply with PEP440. For a discussion on single-sourcing |
35 | | - # the version across setup.py and the project code, see |
36 | | - # https://packaging.python.org/en/latest/single_source_version.html |
37 | 27 | version=versioneer.get_version(), |
38 | | - |
39 | | - description='A Python-based application programmers interface for the Observations Data converter 2 (ODM2) ', |
| 28 | + description='Python interface for the Observations Data converter 2 (ODM2)', |
40 | 29 | long_description=long_description, |
41 | | - |
42 | | - # The project's main homepage. |
43 | 30 | url='https://github.com/ODM2/ODM2PythonAPI', |
44 | | - |
45 | | - # Author details |
46 | 31 | author='ODM2 team-Stephanie Reeder', |
47 | 32 | author_email='stephanie.reeder@usu.edu', |
48 | | - |
49 | | - # note: maintainer gets listed as author in PKG-INFO, so leaving |
50 | | - # this commented out for now |
51 | 33 | maintainer='David Valentine', |
52 | 34 | maintainer_email='david.valentine@gmail.com', |
53 | | - |
54 | | - # Choose your license |
55 | | - license='BSD-3-Clause', |
56 | | - |
57 | | - # See https://pypi.python.org/pypi?%3Aaction=list_classifiers |
| 35 | + license='BSD', |
58 | 36 | classifiers=[ |
59 | | - # How mature is this project? Common values are |
60 | | - # 3 - Alpha |
61 | | - # 4 - Beta |
62 | | - # 5 - Production/Stable |
63 | 37 | 'Development Status :: 3 - Alpha', |
64 | | - |
65 | | - # Indicate who your project is intended for |
66 | 38 | 'Intended Audience :: Developers', |
67 | 39 | 'Topic :: Software Development :: Build Tools', |
68 | | - |
69 | | - # Pick your license as you wish (should match "license" above) |
70 | 40 | 'License :: OSI Approved :: BSD License', |
71 | 41 | 'Operating System :: OS Independent', |
72 | | - # Specify the Python versions you support here. In particular, ensure |
73 | | - # that you indicate whether you support Python 2, Python 3 or both. |
74 | 42 | 'Programming Language :: Python :: 2.7', |
75 | 43 | 'Topic :: Software Development :: Libraries :: Python Modules', |
76 | 44 | 'Topic :: Scientific/Engineering' |
77 | 45 | ], |
78 | | - |
79 | | - # What does your project relate to? |
80 | 46 | keywords='Observations Data converter ODM2', |
81 | | - |
82 | | - # You can just specify the packages manually here if your project is |
83 | | - # simple. Or you can use find_packages(). |
84 | | - |
85 | 47 | packages=find_packages(exclude=['samplefiles', 'setup', 'tests*', 'Forms']), |
86 | | - |
87 | | - # List run-time dependencies here. These will be installed by pip when |
88 | | - # your project is installed. For an analysis of "install_requires" vs pip's |
89 | | - # requirements files see: |
90 | | - # https://packaging.python.org/en/latest/requirements.html |
91 | | - |
92 | | - install_requires=install_reqs, |
93 | | - # install_requires=[ |
94 | | - # 'pyodbc', |
95 | | - # 'six', |
96 | | - # 'sqlalchemy', |
97 | | - # 'shapely', |
98 | | - # 'pandas', |
99 | | - # ], |
100 | | - |
101 | | - # List additional groups of dependencies here (e.g. development |
102 | | - # dependencies). You can install these using the following syntax, |
103 | | - # for example: |
104 | | - # $ pip install -e .[dev,test] |
| 48 | + install_requires=install_requires, |
105 | 49 | extras_require={ |
106 | 50 | 'mysql': ['pymysql'], |
107 | 51 | 'postgis': ['psycopg2'], |
108 | | - 'sqlite': ['pyspatialite >=3.0.0'], # need to look at: http://www.gaia-gis.it/spatialite-2.4.0-4/splite-python.html |
109 | | - 'test': ['coverage'], |
| 52 | + 'sqlite': ['pyspatialite >=3.0.0'], |
110 | 53 | }, |
111 | | - |
112 | | - # If there are data files included in your packages that need to be |
113 | | - # installed, specify them here. If using Python 2.6 or less, then these |
114 | | - # have to be included in MANIFEST.in as well. |
115 | | - # |
116 | | - # package_data={ |
117 | | - # 'sample': ['package_data.dat'], |
118 | | - # }, |
119 | | - |
120 | | - # Although 'package_data' is the preferred approach, in some case you may |
121 | | - # need to place data files outside of your packages. See: |
122 | | - # http://docs.python.org/3.4/distutils/setupscript.html#installing-additional-files # noqa |
123 | | - # In this case, 'data_file' will be installed into '<sys.prefix>/my_data' |
124 | | - |
125 | | - # data_files=[('my_data', ['data/data_file'])], |
126 | | - |
127 | | - # To provide executable scripts, use entry points in preference to the |
128 | | - # "scripts" keyword. Entry points provide cross-platform support and allow |
129 | | - # pip to create the appropriate form of executable for the target platform. |
130 | | - |
131 | | - # entry_points={ |
132 | | - # 'console_scripts': [ |
133 | | - # 'sample=sample:main', |
134 | | - # ], |
135 | | - # }, |
136 | 54 | cmdclass=versioneer.get_cmdclass(), |
137 | 55 | ) |
0 commit comments