forked from dmwm/PycurlClient
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup4pypi.py
40 lines (33 loc) · 1.28 KB
/
setup4pypi.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
#!/usr/bin/env python
import os
import sys
from setuptools import setup
# version of pycurl-client, should match current DBS release tag
package_version = "3.17.8"
# Requirements file for pip dependencies
requirements = "requirements.txt"
def parse_requirements(requirements_file):
"""
Create a list for the 'install_requires' component of the setup function
by parsing a requirements file
"""
if os.path.exists(requirements_file):
# return a list that contains each line of the requirements file
return open(requirements_file, 'r').read().splitlines()
else:
print("ERROR: requirements file " + requirements_file + " not found.")
sys.exit(1)
setup(name="dbs3-pycurl",
version=package_version,
maintainer="CMS DWMWM Group",
maintainer_email="[email protected]",
packages=['RestClient',
'RestClient.AuthHandling',
'RestClient.ErrorHandling',
'RestClient.ProxyPlugins',
'RestClient.RequestHandling'],
package_dir={'': 'src/python/'},
install_requires=parse_requirements(requirements),
url="https://github.com/dmwm/PycurlClient/tree/3.17.8",
license="Apache License, Version 2.0",
)