forked from joerick/pyinstrument
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
59 lines (53 loc) · 2.07 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
import sys
import subprocess, os, distutils
from setuptools import setup, find_packages
# pylint: disable=e1101
class CommandUtilities:
def check_call(self, args, **popen_kwargs):
self.announce('Running command: %s' % ' '.join(args), level=distutils.log.INFO)
if not self.dry_run:
subprocess.check_call(args, **popen_kwargs)
class BuildAndUploadCommand(distutils.cmd.Command, CommandUtilities):
user_options = []
def initialize_options(self): pass
def finalize_options(self): pass
def run(self):
self.check_call(['rm', '-rf', 'dist'])
self.check_call(['bin/build_js_bundle.py', '--force'])
self.run_command('build')
self.run_command('sdist')
self.run_command('bdist_wheel')
self.check_call([sys.executable + ' -m twine upload dist/*'], shell=True)
with open(os.path.join(os.path.dirname(__file__), 'README.md')) as f:
long_description = f.read()
setup(
name="pyinstrument",
packages=find_packages(),
version="3.4.2",
description="Call stack profiler for Python. Shows you why your code is slow!",
long_description=long_description,
long_description_content_type='text/markdown',
author='Joe Rickerby',
author_email='[email protected]',
url='https://github.com/joerick/pyinstrument',
keywords=['profiling', 'profile', 'profiler', 'cpu', 'time', 'sampling'],
install_requires=['pyinstrument_cext>=0.2.2'],
include_package_data=True,
python_requires='>=3.6',
entry_points={'console_scripts': ['pyinstrument = pyinstrument.__main__:main']},
zip_safe=False,
cmdclass={
'build_and_upload': BuildAndUploadCommand,
},
classifiers=[
'Environment :: Console',
'Environment :: Web Environment',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Operating System :: MacOS',
'Operating System :: Microsoft :: Windows',
'Operating System :: POSIX',
'Topic :: Software Development :: Debuggers',
'Topic :: Software Development :: Testing',
]
)