forked from RDFLib/sparqlwrapper
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
executable file
·81 lines (72 loc) · 2.59 KB
/
setup.py
File metadata and controls
executable file
·81 lines (72 loc) · 2.59 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# -*- coding: utf-8 -*-
import sys
try:
from ez_setup import use_setuptools
use_setuptools()
except:
pass
from setuptools import setup, find_packages
try:
import six
py3 = six.PY3
except:
py3 = sys.version_info[0] >= 3
# grouping requires
_requires = []
_install_requires = []
# rdflib
_requires.append('rdflib')
_install_requires.append('rdflib >= 2.4.2')
# simplejson
if sys.version_info[0:2] < (2, 6):
_requires.append('simplejson')
_install_requires.append('simplejson == 2.0.9')
# metainformation
if py3:
import re
_version_re = re.compile(r'__version__\s*=\s*"(.*)"')
_authors_re = re.compile(r'__authors__\s*=\s*"(.*)"')
_url_re = re.compile(r'__url__\s*=\s*"(.*)"')
for line in open('SPARQLWrapper/__init__.py', encoding='utf-8'):
version_match = _version_re.match(line)
if version_match:
version = version_match.group(1)
authors_match = _authors_re.match(line)
if authors_match:
authors = authors_match.group(1)
url_match = _url_re.match(line)
if url_match:
url = url_match.group(1)
else:
import SPARQLWrapper
version = SPARQLWrapper.__version__
authors = SPARQLWrapper.__authors__
url = SPARQLWrapper.__url__
# actual setup configuration
setup(
name = 'SPARQLWrapper',
version = version,
description = 'SPARQL Endpoint interface to Python',
long_description = 'This is a wrapper around a SPARQL service. It helps in creating the query URI and, possibly, convert the result into a more manageable format.',
license = 'W3C SOFTWARE NOTICE AND LICENSE', # should be removed by PEP 314
author = authors,
author_email = "ivan at ivan-herman net, sergio at wikier org, carlos.tejo at gmail com, indeyets at gmail com",
url = url,
download_url = 'https://github.com/RDFLib/sparqlwrapper/releases',
platforms = ['any'], # should be removed by PEP 314
packages = ['SPARQLWrapper'],
requires = _requires, # used by distutils to create metadata PKG-INFO
install_requires = _install_requires, # used by setuptools to install the dependencies
classifiers = [
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
'License :: OSI Approved :: W3C License',
'Operating System :: OS Independent',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 3',
],
keywords = 'python SPARQL',
use_2to3 = True,
#requires_python = '>=2.5', # Future in PEP 345
#scripts = ['ez_setup.py']
)