wbond | 55908ac | 2015-07-17 16:24:30 -0400 | [diff] [blame] | 1 | import os |
| 2 | import shutil |
| 3 | |
| 4 | from setuptools import setup, find_packages, Command |
| 5 | |
wbond | b9b7597 | 2015-06-15 09:09:17 -0400 | [diff] [blame] | 6 | import asn1crypto |
| 7 | |
| 8 | |
wbond | 55908ac | 2015-07-17 16:24:30 -0400 | [diff] [blame] | 9 | |
| 10 | class CleanCommand(Command): |
| 11 | user_options = [] |
| 12 | |
| 13 | def initialize_options(self): |
| 14 | pass |
| 15 | |
| 16 | def finalize_options(self): |
| 17 | pass |
| 18 | |
| 19 | def run(self): |
| 20 | folder = os.path.dirname(os.path.abspath(__file__)) |
| 21 | for sub_folder in ['build', 'dist', 'asn1crypto.egg-info']: |
| 22 | full_path = os.path.join(folder, sub_folder) |
| 23 | if os.path.exists(full_path): |
| 24 | shutil.rmtree(full_path) |
| 25 | |
| 26 | |
wbond | b9b7597 | 2015-06-15 09:09:17 -0400 | [diff] [blame] | 27 | setup( |
| 28 | name='asn1crypto', |
| 29 | version=asn1crypto.__version__, |
| 30 | |
| 31 | description='Fast ASN.1 parser and serializer with definitions for private keys, public keys, certificates, CRL, OCSP, CMS, PKCS#7, PKCS#8, PKCS#12, PKCS#5, X509 and TSA', |
| 32 | long_description='Docs for this project are maintained at https://github.com/wbond/asn1crypto#readme.', |
| 33 | |
| 34 | url='https://github.com/wbond/asn1crypto', |
| 35 | |
| 36 | author='wbond', |
| 37 | author_email='will@wbond.net', |
| 38 | |
| 39 | license='MIT', |
| 40 | |
| 41 | classifiers=[ |
| 42 | 'Development Status :: 4 - Beta', |
| 43 | |
| 44 | 'Intended Audience :: Developers', |
| 45 | |
| 46 | 'License :: OSI Approved :: MIT License', |
| 47 | |
| 48 | 'Programming Language :: Python :: 2.7', |
| 49 | 'Programming Language :: Python :: 3.3', |
| 50 | 'Programming Language :: Python :: 3.4', |
| 51 | ], |
| 52 | |
| 53 | keywords='asn1 crypto', |
| 54 | |
wbond | 55908ac | 2015-07-17 16:24:30 -0400 | [diff] [blame] | 55 | packages=find_packages(exclude=['tests*', 'dev*']), |
| 56 | |
| 57 | cmdclass={ |
| 58 | 'clean': CleanCommand, |
| 59 | } |
wbond | b9b7597 | 2015-06-15 09:09:17 -0400 | [diff] [blame] | 60 | ) |