-
Notifications
You must be signed in to change notification settings - Fork 39
/
Copy pathsetup.py
95 lines (86 loc) · 2.8 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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
#!/usr/bin/env python
# encoding: utf-8
from __future__ import absolute_import, print_function
import os
import pypi_server
from setuptools import setup, find_packages
def walker(base, *paths):
file_list = set([])
cur_dir = os.path.abspath(os.curdir)
os.chdir(base)
try:
for path in paths:
for dname, dirs, files in os.walk(path):
for f in files:
file_list.add(os.path.join(dname, f))
finally:
os.chdir(cur_dir)
return list(file_list)
data_files = ()
if os.geteuid() == 0:
data_files = (
("/etc/systemd/system", (os.path.join('contrib', 'pypi-server.service'),)),
("/etc", (os.path.join('contrib', 'pypi-server.conf.example'),))
)
setup(
name='pypi-server',
version=pypi_server.__version__,
author=pypi_server.__author__,
author_email=", ".join(map(lambda x: x[1], pypi_server.author_info)),
url="https://github.com/mosquito/pypi-server/",
license="MIT",
description="Tornado PyPi server",
long_description=open('README.rst').read(),
platforms="all",
classifiers=[
'Development Status :: 4 - Beta',
'Environment :: Console',
'License :: OSI Approved :: MIT License',
'Natural Language :: English',
'Operating System :: MacOS',
'Operating System :: POSIX',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: Implementation :: CPython',
'Topic :: Communications :: Email',
'Topic :: Internet :: WWW/HTTP',
'Topic :: Internet :: WWW/HTTP :: HTTP Servers',
'Topic :: Software Development',
'Topic :: Software Development :: Build Tools',
'Topic :: Software Development :: Version Control',
'Topic :: System',
'Topic :: System :: Software Distribution',
],
include_package_data=True,
zip_safe=False,
package_data={
'pypi_server': walker(os.path.dirname(pypi_server.__file__), 'static', 'templates'),
},
data_files=data_files,
entry_points={
'console_scripts': [
'pypi-server = pypi_server.server:run',
],
},
packages=find_packages(exclude=('tests',)),
install_requires=(
'tornado>=4.3,<5',
'tornado-xmlrpc',
'slimurl',
'peewee<3',
'bcrypt>=2.0',
# For building with Debian. By default is uses python3.4
'lxml<4.4',
'futures',
'six',
),
extras_require={
'mysql': ['mysqlclient'],
'postgres': ['psycopg2-binary'],
'proxy': ['pycurl'],
}
)