-
Notifications
You must be signed in to change notification settings - Fork 5
/
setup.py
74 lines (61 loc) · 2.12 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
# -*- coding: utf-8 -*-
import os
from setuptools import setup, find_packages, Command
from setuptools.command.install import install
from setuptools.command.install_egg_info import install_egg_info
from distutils.sysconfig import get_python_lib
import run
here = os.path.dirname(__file__)
pth_file = "subprocess.run.pth"
class Install(install):
def run(self):
install.run(self)
class InstallEggInfo(install_egg_info):
def run(self):
install_egg_info.run(self)
filepath = '%s/installed-files.txt' % self.target
with open(filepath, "w") as f:
f.write("../%s\n" % pth_file)
class PyTest(Command):
user_options = []
def initialize_options(self):
pass
def finalize_options(self):
pass
def run(self):
import sys,subprocess
errno = subprocess.call([sys.executable, 'runtests.py', 'tests.py'])
raise SystemExit(errno)
setup(name='subprocess.run',
version=run.__version__,
data_files = [
(get_python_lib(), [pth_file]),
],
packages=find_packages(),
author='Sebastian Pawluś',
author_email='[email protected]',
url='https://github.com/xando/subprocess.run',
description="The subprocess module extension to run processes.",
keywords="subprocess run process",
license=open(os.path.join(here, "LICENSE")).read(),
long_description=open(os.path.join(here, "README.rst")).read(),
include_package_data=True,
zip_safe=False,
platforms=['any'],
classifiers=[
'Development Status :: 4 - Beta',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: Implementation :: PyPy'
],
cmdclass = {
'install': Install,
'install_egg_info': InstallEggInfo,
'test': PyTest,
},
)