setup.py: simplify, use setuptools sdist command

This commit is contained in:
Benjamin Dauvergne 2016-03-11 14:56:11 +01:00
parent 35e0bc9047
commit 2654e9a437
1 changed files with 13 additions and 34 deletions

View File

@ -1,38 +1,17 @@
#!/usr/bin/python
from setuptools import setup
from distutils.cmd import Command
from unittest import TextTestRunner, TestLoader
import os
class TestCommand(Command):
user_options = [ ]
def initialize_options(self):
self._dir = os.getcwd()
def finalize_options(self):
pass
def run(self):
'''
Finds all the tests modules in tests/, and runs them.
'''
tests = TestLoader().loadTestsFromName('tests.api')
t = TextTestRunner(verbosity = 1)
t.run(tests)
setup(name='rfc3161',
version='1.0.6',
license='MIT',
url='https://dev.entrouvert.org/projects/python-rfc3161',
description='Python implementation of the RFC3161 specification, using pyasn1',
long_description=file('README').read(),
author='Benjamin Dauvergne',
author_email='bdauvergne@entrouvert.com',
packages=['rfc3161'],
install_requires=[
'pyasn1',
'pyasn1_modules',
'requests',
'M2Crypto'],
cmdclass={'test': TestCommand})
version='1.0.6',
license='MIT',
url='https://dev.entrouvert.org/projects/python-rfc3161',
description='Python implementation of the RFC3161 specification, using pyasn1',
long_description=file('README').read(),
author='Benjamin Dauvergne',
author_email='bdauvergne@entrouvert.com',
packages=['rfc3161'],
install_requires=[
'pyasn1',
'pyasn1_modules',
'requests',
'M2Crypto'])