[10321] | 1 | # from distutils.core import setup, Command |
---|
| 2 | import os |
---|
| 3 | from setuptools import setup, find_packages |
---|
| 4 | from setuptools.command.test import test as TestCommand |
---|
| 5 | import sys |
---|
| 6 | |
---|
| 7 | tests_path = os.path.join(os.path.dirname(__file__), 'tests') |
---|
| 8 | |
---|
| 9 | class PyTest(TestCommand): |
---|
| 10 | def finalize_options(self): |
---|
| 11 | TestCommand.finalize_options(self) |
---|
| 12 | args = sys.argv[sys.argv.index('test')+1:] |
---|
| 13 | self.test_args = args |
---|
| 14 | self.test_suite = True |
---|
| 15 | def run_tests(self): |
---|
| 16 | #import here, cause outside the eggs aren't loaded |
---|
| 17 | import pytest |
---|
| 18 | errno = pytest.main(self.test_args) |
---|
| 19 | sys.exit(errno) |
---|
| 20 | |
---|
| 21 | install_requires = [ |
---|
| 22 | 'setuptools', |
---|
| 23 | 'webob', |
---|
| 24 | ] |
---|
| 25 | |
---|
[10342] | 26 | if sys.version_info < (3, 2): |
---|
| 27 | install_requires.append('pysqlite') # included in Python >= 3.2 |
---|
| 28 | |
---|
[10321] | 29 | tests_require = [ |
---|
| 30 | 'pytest', |
---|
| 31 | 'pytest-cov', |
---|
| 32 | 'PasteDeploy', |
---|
| 33 | ] |
---|
| 34 | |
---|
| 35 | docs_require = ['Sphinx', 'Pygments'] |
---|
| 36 | |
---|
| 37 | setup( |
---|
| 38 | name='waeup.cas', |
---|
| 39 | version='0.1dev', |
---|
| 40 | author='Uli Fouquet', |
---|
| 41 | author_email='uli@gnufix.de', |
---|
| 42 | packages=['waeup.cas',], |
---|
| 43 | scripts=[], |
---|
| 44 | url='http://pypi.python.org/pypi/waeup.cas/', |
---|
| 45 | license='LICENSE.txt', |
---|
| 46 | description='CAS Single Sign-On components for waeup.kofa.', |
---|
| 47 | long_description=open('README.rst').read() + '\n\n' + open( |
---|
| 48 | 'CHANGES.txt').read() + '\n\n' + 'Download\n********\n', |
---|
| 49 | classifiers=['Development Status :: 3 - Alpha', |
---|
| 50 | 'Intended Audience :: Developers', |
---|
| 51 | 'License :: OSI Approved :: GNU Lesser General Public License v3 or later (LGPLv3+)', |
---|
| 52 | 'Programming Language :: Python', |
---|
| 53 | 'Topic :: Software Development :: Libraries :: Python Modules', |
---|
| 54 | 'Programming Language :: Python :: 2.6', |
---|
| 55 | 'Programming Language :: Python :: 2.7', |
---|
| 56 | 'Programming Language :: Python :: 3.2', |
---|
| 57 | 'Programming Language :: Python :: 3.3', |
---|
| 58 | ], |
---|
| 59 | install_requires=install_requires, |
---|
| 60 | tests_require=tests_require, |
---|
| 61 | extras_require = dict( |
---|
| 62 | tests = tests_require, |
---|
| 63 | docs = docs_require, |
---|
| 64 | ), |
---|
| 65 | cmdclass = {'test': PyTest}, |
---|
| 66 | zip_safe = False, |
---|
| 67 | entry_points="""[paste.app_factory] |
---|
| 68 | server = waeup.cas:make_cas_server |
---|
| 69 | """, |
---|
| 70 | ) |
---|