-
Notifications
You must be signed in to change notification settings - Fork 1
/
setup.py
44 lines (38 loc) · 1.27 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
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Setup script for the Python implementation of LD Patch
"""
from setuptools import setup
from ast import literal_eval
def get_version(source='ldpatch/__init__.py'):
"""
Retrieve version number without importing the script.
"""
with open(source) as pyfile:
for line in pyfile:
if line.startswith('__version__'):
return literal_eval(line.partition('=')[2].lstrip())
raise ValueError("VERSION not found")
README = ''
with open('README.rst', 'r') as f:
README = f.read()
INSTALL_REQ = []
with open('requirements.txt', 'r') as f:
# Get requirements depencies as written in the file
INSTALL_REQ = [ i[:-1] for i in f if i[0] != "#" ]
setup(name = 'ldpatch',
version = get_version(),
package_dir = {'': '.'},
packages = ['ldpatch'],
description = 'An Python implementation of LD Patch, a PATCH format for Linked Data',
long_description = README,
author='Pierre-Antoine Champin',
author_email='[email protected]',
license='LGPL v3',
platforms='OS Independant',
url='http://github.com/pchampin/ld-patch-py',
include_package_data=True,
install_requires=INSTALL_REQ,
scripts=['bin/ldpatch-apply'],
)