Skip to content

Commit 9e0a670

Browse files
committed
clean setup.py up
1 parent ee3ae1c commit 9e0a670

1 file changed

Lines changed: 15 additions & 97 deletions

File tree

setup.py

Lines changed: 15 additions & 97 deletions
Original file line numberDiff line numberDiff line change
@@ -5,133 +5,51 @@
55
https://github.com/pypa/sampleproject
66
"""
77

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
169
from codecs import open
17-
from os import path
10+
11+
from setuptools import find_packages, setup
1812

1913
import versioneer
2014

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]
2221

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()
2624

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 = ""
3125
setup(
3226
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
3727
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)',
4029
long_description=long_description,
41-
42-
# The project's main homepage.
4330
url='https://github.com/ODM2/ODM2PythonAPI',
44-
45-
# Author details
4631
author='ODM2 team-Stephanie Reeder',
4732
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
5133
maintainer='David Valentine',
5234
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',
5836
classifiers=[
59-
# How mature is this project? Common values are
60-
# 3 - Alpha
61-
# 4 - Beta
62-
# 5 - Production/Stable
6337
'Development Status :: 3 - Alpha',
64-
65-
# Indicate who your project is intended for
6638
'Intended Audience :: Developers',
6739
'Topic :: Software Development :: Build Tools',
68-
69-
# Pick your license as you wish (should match "license" above)
7040
'License :: OSI Approved :: BSD License',
7141
'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.
7442
'Programming Language :: Python :: 2.7',
7543
'Topic :: Software Development :: Libraries :: Python Modules',
7644
'Topic :: Scientific/Engineering'
7745
],
78-
79-
# What does your project relate to?
8046
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-
8547
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,
10549
extras_require={
10650
'mysql': ['pymysql'],
10751
'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'],
11053
},
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-
# },
13654
cmdclass=versioneer.get_cmdclass(),
13755
)

0 commit comments

Comments
 (0)