forked from dmwm/DBSClient
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetupPypi.py
38 lines (30 loc) · 1.11 KB
/
setupPypi.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
#!/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.3"
# 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-client",
version=package_version,
maintainer="CMS DWMWM Group",
maintainer_email="[email protected]",
packages=['dbsClient.apis',
'dbsClient.exceptions'],
package_dir={'': 'src/python'},
install_requires=parse_requirements(requirements),
url="https://github.com/dmwm/DBSClient/tree/3.17.3",
license="Apache License, Version 2.0",
)