-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
56 lines (48 loc) · 1.31 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
import os
from distutils.core import Command
from setuptools import setup, find_packages
name = 'ecs_api'
version = '0.1'
class RPMCommand(Command):
description = "Build src and binary rpms."
user_options = []
def initialize_options(self):
pass
def finalize_options(self):
pass
def run(self):
"""
Run sdist, then 'rpmbuild' the tar.gz
"""
os.system("cp %s.spec /tmp" % name)
try:
os.system("rm -rf %s-%s" % (name, version))
self.run_command('sdist')
os.system('rpmbuild -ta --clean dist/%s-%s.tar.gz' %
(name, version))
finally:
os.system("mv /tmp/%s.spec ." % name)
setup(name=name,
version=version,
description='ECS API',
long_description='ECS API',
classifiers=[
"Programming Language :: Python",
],
author='Wei Shi',
author_email='[email protected]',
license="GPLv2",
url='https://github.com/shi2wei3/ecs_api',
keywords='ecs api',
packages=find_packages(),
include_package_data=True,
zip_safe=False,
requires=['requests', 'urllib3'],
cmdclass={
"rpm": RPMCommand
},
entry_points="""\
[console_scripts]
ecs = ecs_api.ecs:main
"""
)