forked from lbt/git-pkg
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
36 lines (31 loc) · 1.03 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
#!/usr/bin/env python
import os, sys
from distutils.core import setup
try:
import setuptools
# enable "setup.py develop", optional
except ImportError:
pass
if 'install' in sys.argv and \
'MAKEFLAGS' not in os.environ and \
'RPM_BUILD_ROOT' not in os.environ:
repl = raw_input('WARNING: Please use `make install` for installation, continue(y/N)? ')
if repl != 'y':
sys.exit(1)
# For debian based systems, '--install-layout=deb' is needed after 2.6
if sys.version_info[:2] <= (2, 5) and '--install-layout=deb' in sys.argv:
del sys.argv[sys.argv.index('--install-layout=deb')]
try:
with open('version.py') as f: exec(f.read())
version=__version__
except IOError:
print 'WARNING: Cannot write version number file'
setup(name='gitpkg',
version = version,
description='Mer git packaging tools',
author='David Greaves',
author_email='[email protected]',
url='https://github.com/mer-tools/git-pkg',
scripts=['gp_mkpkg'],
py_modules=['BlockDumper']
)