forked from pfultz2/cget
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
39 lines (34 loc) · 1.18 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
from setuptools import setup, find_packages
import os, re, sys
def get_version(package):
"""Return package version as listed in `__version__` in `init.py`."""
init_py = open(os.path.join(package, '__init__.py')).read()
return re.search("__version__ = ['\"]([^'\"]+)['\"]", init_py).group(1)
def get_requires(filename):
requirements = []
with open(filename) as req_file:
for line in req_file.read().splitlines():
if not line.strip().startswith("#"):
requirements.append(line)
return requirements
project_requirements = get_requires("requirements.txt")
if os.name == 'posix' and sys.version_info[0] < 3: project_requirements.append('subprocess32')
setup(
name="cget",
version=get_version("cget"),
url='https://github.com/pfultz2/cget',
license='boost',
description='Cmake package retrieval',
author='Paul Fultz II',
author_email='[email protected]',
packages=find_packages(),
package_data={'cmake': ['*.cmake']},
install_requires=project_requirements,
include_package_data=True,
entry_points={
'console_scripts': [
'cget = cget.cli:cli',
]
},
zip_safe=False
)