-
Notifications
You must be signed in to change notification settings - Fork 3
/
setup.py
70 lines (59 loc) · 2.03 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
# -*- coding: utf-8 -*-
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 path2
pth_file = "os.path2.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='os.path2',
version=path2.__version__,
data_files = [
(get_python_lib(), [pth_file]),
],
packages=find_packages(),
author='Sebastian Pawluś',
author_email='[email protected]',
url='https://github.com/xando/osome',
description="The os.path module replacement, with simple API.",
keywords="os path ",
license=path2.path("LICENSE").open("r").read(),
long_description=path2.path("README.rst").open("r").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,
},
)