-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
51 lines (40 loc) · 1.26 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
from setuptools import find_packages, setup
import re
def readfile(path):
with open(path) as fd:
return fd.read()
def setuptools_requires(path):
"""
Get the package names from the requirements file
This strips any version pinning from each specification
"""
reqs = []
pkgname_pypi_re = re.compile(r'^(?P<pkg>[a-zA-Z0-9-_.]+)')
with open(path) as fd:
for line in fd:
l = line.strip()
if not l: continue
if l.startswith('#'): continue
m = pkgname_pypi_re.match(l)
if m:
pkg = m.group('pkg')
reqs.append(pkg)
else:
msg = "I don't know how to parse package name from: %r" % l
raise NotImplementedError(msg)
return reqs
setup(
name = 'cloudmesh.core',
author = "Gregor von Laszewski, Badi' Abdul-Wahid",
version = readfile('VERSION').strip(),
licence = 'Apache 2.0',
namespace_packages = ['cloudmesh'],
packages = find_packages(),
install_requires = setuptools_requires('requirements.open'),
test_requires = setuptools_requires('requirements.dev'),
entry_points = {
'console_scripts': [
'cm=cloudmesh.cli.main:main',
],
},
)