-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#24] improved setup spec as part of adding pylibdmtx
- Loading branch information
1 parent
9ba06de
commit b9727bd
Showing
1 changed file
with
52 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,56 @@ | ||
#!/usr/bin/env python | ||
from setuptools import setup | ||
import sys | ||
|
||
import gouda | ||
|
||
setup( | ||
name='gouda', | ||
version=gouda.__version__, | ||
description=gouda.__doc__, | ||
author='Lawrence Hudson', | ||
author_email='[email protected]', | ||
packages=['gouda', 'gouda.engines', 'gouda.java', 'gouda.strategies', | ||
'gouda.strategies.roi'], | ||
test_suite="gouda.tests", | ||
scripts=['gouda/scripts/decode_barcodes.py'], | ||
install_requires=[l.replace('==', '>=') for l in open('requirements.txt')], | ||
) | ||
SCRIPTS = ['read_barcodes'] | ||
|
||
URL = 'https://github.com/NaturalHistoryMuseum/gouda/' | ||
|
||
|
||
setup_data = { | ||
'name': 'gouda', | ||
'version': gouda.__version__, | ||
'author': 'Lawrence Hudson', | ||
'author_email': '[email protected]', | ||
'url': URL, | ||
'description': gouda.__doc__, | ||
'long_description': 'Visit {0} for more details.'.format(URL), | ||
'packages': [ | ||
'gouda', 'gouda.engines', 'gouda.java', 'gouda.strategies', | ||
'gouda.strategies.roi', 'gouda.tests', | ||
], | ||
'include_package_data': True, | ||
'test_suite': 'gouda.tests', | ||
'scripts': ['gouda/scripts/{0}.py'.format(script) for script in SCRIPTS], | ||
'entry_points': { | ||
'console_scripts': | ||
['{0}=gouda.scripts.{0}:main'.format(script) for script in SCRIPTS], | ||
}, | ||
'install_requires': [ | ||
# TODO How to specify OpenCV? 'cv2>=2.4.8,<3', | ||
'numpy>=1.8.2', | ||
'pathlib>=1.0.1', | ||
], | ||
'tests_require': [ | ||
'nose>=1.3.4', | ||
], | ||
'classifiers': [ | ||
'Development Status :: 4 - Beta', | ||
'License :: OSI Approved :: MIT License', | ||
'Topic :: Utilities', | ||
'Programming Language :: Python :: 2', | ||
'Programming Language :: Python :: 2.7', | ||
] | ||
} | ||
|
||
|
||
def setuptools_setup(): | ||
from setuptools import setup | ||
setup(**setup_data) | ||
|
||
|
||
if (2, 7) == sys.version_info[:2]: | ||
setuptools_setup() | ||
else: | ||
sys.exit('Only Python 2.7 is supported') |