-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathsetup.py
More file actions
41 lines (36 loc) · 1.2 KB
/
setup.py
File metadata and controls
41 lines (36 loc) · 1.2 KB
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
from setuptools import setup
import glob, re, os
## get documentation from README.md
with open("README.md", "r") as fh:
long_description = fh.read()
## get version from spec file
with open('fnal-snow-python.spec', 'r') as fh:
for line in fh:
m = re.search("^Version:\s+(.*)\s*$", line)
if m:
version=m.group(1)
break
## get list of files to install
pyfiles = glob.glob(os.path.join('*', '*.py'))
pyfiles = [pyfile[:-3] for pyfile in pyfiles]
scripts = glob.glob(os.path.join('usr/sbin/*'))
man = glob.glob(os.path.join('man/man1/*'))
setup (
author_email = 'tskirvin@fnal.gov',
author = 'Tim Skirvin',
data_files = [ ( 'share/man/man1', man ) ],
description = 'SNOW JSON API access',
license = 'Perl Artistic',
install_requires = ['pysnow>=0.7.4', 'PyYAML>=3.11'],
keywords = ['snow', 'service-now'],
long_description_content_type = 'text/markdown',
long_description = long_description,
maintainer_email = 'tskirvin@fnal.gov',
maintainer = 'Tim Skirvin',
name = 'pyfnalsnow',
package_dir = { 'pyfnalsnow': 'pyfnalsnow' },
py_modules = pyfiles,
scripts = scripts,
url = 'https://github.com/tskirvin/pyfnalsnow.git',
version = version
)