1#!/usr/bin/env python
2# -*- coding: utf-8 -*-
3
4import sys
5
6try:
7    from ez_setup import use_setuptools
8    use_setuptools()
9except:
10    pass
11
12from setuptools import setup
13
14try:
15    import six
16    py3 = six.PY3
17except:
18    py3 = sys.version_info[0] >= 3
19
20# metadata
21import re
22_version_re = re.compile(r'__version__\s*=\s*"(.*)"')
23_authors_re = re.compile(r'__authors__\s*=\s*"(.*)"')
24_url_re = re.compile(r'__url__\s*=\s*"(.*)"')
25
26for line in open('SPARQLWrapper/__init__.py'):
27
28    version_match = _version_re.match(line)
29    if version_match:
30        version = version_match.group(1)
31
32    authors_match = _authors_re.match(line)
33    if authors_match:
34        authors = authors_match.group(1)
35
36    url_match = _url_re.match(line)
37    if url_match:
38        url = url_match.group(1)
39
40# requirements
41with open('requirements.txt', 'r') as f:
42    _install_requires = [line.rstrip('\n') for line in f]
43
44
45setup(
46      name = 'SPARQLWrapper',
47      version = version,
48      description = 'SPARQL Endpoint interface to Python',
49      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.',
50      license = 'W3C SOFTWARE NOTICE AND LICENSE',
51      author = authors,
52      url = url,
53      download_url = 'https://github.com/RDFLib/sparqlwrapper/releases',
54      platforms = ['any'],
55      packages = ['SPARQLWrapper'],
56      install_requires = _install_requires,
57      extras_require = {
58        'keepalive': ['keepalive>=0.5'],
59      },
60      classifiers =  [
61        'Development Status :: 5 - Production/Stable',
62        'Intended Audience :: Developers',
63        'License :: OSI Approved :: W3C License',
64        'Operating System :: OS Independent',
65        'Programming Language :: Python :: 2',
66        'Programming Language :: Python :: 2.7',
67        'Programming Language :: Python :: 3',
68        'Programming Language :: Python :: 3.3',
69        'Programming Language :: Python :: 3.4',
70        'Programming Language :: Python :: 3.5',
71        'Programming Language :: Python :: 3.6',
72        'Programming Language :: Python :: 3.7',
73        'Programming Language :: Python :: Implementation :: CPython',
74        'Programming Language :: Python :: Implementation :: PyPy',
75        'Topic :: Software Development :: Libraries :: Python Modules',
76      ],
77      keywords = ['python', 'sparql', 'rdf', 'rdflib'],
78      use_2to3 = True,
79      use_2to3_fixers = ['custom_fixers'],
80      project_urls={
81        'Home': 'https://rdflib.github.io/sparqlwrapper/',
82        'Documentation': 'https://rdflib.github.io/sparqlwrapper/doc/',
83        'Source': 'https://github.com/RDFLib/sparqlwrapper',
84        'Tracker': 'https://github.com/RDFLib/sparqlwrapper/issues',
85	  }
86)
87