blob: d8825d8c1e297f5b2472052a5ad68fe2558b588d [file] [log] [blame]
wbond55908ac2015-07-17 16:24:30 -04001import os
2import shutil
3
4from setuptools import setup, find_packages, Command
5
wbondb9b75972015-06-15 09:09:17 -04006import asn1crypto
7
8
wbond55908ac2015-07-17 16:24:30 -04009class CleanCommand(Command):
wbond13df68b2016-06-16 05:50:48 -040010 user_options = [
11 ('all', None, '(Compatibility with original clean command)')
12 ]
wbond55908ac2015-07-17 16:24:30 -040013
14 def initialize_options(self):
wbond13df68b2016-06-16 05:50:48 -040015 self.all = False
wbond55908ac2015-07-17 16:24:30 -040016
17 def finalize_options(self):
18 pass
19
20 def run(self):
21 folder = os.path.dirname(os.path.abspath(__file__))
22 for sub_folder in ['build', 'dist', 'asn1crypto.egg-info']:
23 full_path = os.path.join(folder, sub_folder)
24 if os.path.exists(full_path):
25 shutil.rmtree(full_path)
wbondb86376f2015-07-30 11:53:55 -040026 for root, dirnames, filenames in os.walk(os.path.join(folder, 'asn1crypto')):
27 for filename in filenames:
28 if filename[-4:] == '.pyc':
29 os.unlink(os.path.join(root, filename))
30 for dirname in list(dirnames):
31 if dirname == '__pycache__':
32 shutil.rmtree(os.path.join(root, dirname))
wbond55908ac2015-07-17 16:24:30 -040033
34
wbondb9b75972015-06-15 09:09:17 -040035setup(
36 name='asn1crypto',
37 version=asn1crypto.__version__,
38
wbond3a487a42015-10-07 12:08:07 -040039 description=(
wbond50f78762016-03-17 11:49:22 -040040 'Fast ASN.1 parser and serializer with definitions for private keys, '
41 'public keys, certificates, CRL, OCSP, CMS, PKCS#3, PKCS#7, PKCS#8, '
42 'PKCS#12, PKCS#5, X.509 and TSP'
wbond3a487a42015-10-07 12:08:07 -040043 ),
wbondb9b75972015-06-15 09:09:17 -040044 long_description='Docs for this project are maintained at https://github.com/wbond/asn1crypto#readme.',
45
46 url='https://github.com/wbond/asn1crypto',
47
48 author='wbond',
49 author_email='will@wbond.net',
50
51 license='MIT',
52
53 classifiers=[
54 'Development Status :: 4 - Beta',
55
56 'Intended Audience :: Developers',
57
58 'License :: OSI Approved :: MIT License',
59
wbond3f4a61c2015-08-24 10:45:00 -040060 'Programming Language :: Python :: 2.6',
wbondb9b75972015-06-15 09:09:17 -040061 'Programming Language :: Python :: 2.7',
wbondbc3f0f62015-10-20 01:07:32 -040062 'Programming Language :: Python :: 3.2',
wbondb9b75972015-06-15 09:09:17 -040063 'Programming Language :: Python :: 3.3',
64 'Programming Language :: Python :: 3.4',
wbondbc3f0f62015-10-20 01:07:32 -040065 'Programming Language :: Python :: 3.5',
66 'Programming Language :: Python :: Implementation :: PyPy',
67
68 'Topic :: Security :: Cryptography',
wbondb9b75972015-06-15 09:09:17 -040069 ],
70
wbond50f78762016-03-17 11:49:22 -040071 keywords='asn1 crypto pki x509 certificate rsa dsa ec dh',
wbondb9b75972015-06-15 09:09:17 -040072
wbond55908ac2015-07-17 16:24:30 -040073 packages=find_packages(exclude=['tests*', 'dev*']),
74
wbondd7a440c2016-03-31 05:19:12 -040075 test_suite='dev.tests.make_suite',
76
wbond55908ac2015-07-17 16:24:30 -040077 cmdclass={
78 'clean': CleanCommand,
79 }
wbondb9b75972015-06-15 09:09:17 -040080)