-
Notifications
You must be signed in to change notification settings - Fork 122
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve packaging #196
Improve packaging #196
Changes from all commits
42ae766
966b70d
ef2c229
03d5312
71e1adc
7bb54b8
f253619
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -825,10 +825,9 @@ The source distribution contains: | |
somewhere into your PYTHONPATH. Alternatively, you can also run | ||
the distutils scripts: ``python setup.py install`` | ||
|
||
- ``test``: some unit and integrations tests. In order to run the tests | ||
some packages have to be installed before. So please install the packages | ||
listed in requirements.development.txt: | ||
``pip install -r requirements.development.txt`` | ||
- ``test``: some unit and integrations tests. In order to run the tests | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm fairly sure this is deprecated:
Maybe it is okay for now, but better to point people to tox if they want something easy to manage. I'm somewhat okay with the change you made as is, because it makes it no worse, but this is something we have to fix sometime. |
||
some packages have to be installed before. So please install the dev packages: | ||
``pip install '.[dev]'`` | ||
|
||
- ``scripts``: some scripts to run the package against some SPARQL endpoints. | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[build-system] | ||
requires = ["wheel", "setuptools"] | ||
build-backend = "setuptools.build_meta" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
[metadata] | ||
name = SPARQLWrapper | ||
version = attr: SPARQLWrapper.__init__.__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 | ||
author = attr: SPARQLWrapper.__init__.__authors__ | ||
author_email = attr: SPARQLWrapper.__init__.__contact__ | ||
url = attr: SPARQLWrapper.__init__.__url__ | ||
download_url = https://github.com/RDFLib/sparqlwrapper/releases | ||
platforms = | ||
any | ||
classifiers = | ||
Development Status :: 5 - Production/Stable | ||
Intended Audience :: Developers | ||
License :: OSI Approved :: W3C License | ||
Operating System :: OS Independent | ||
Programming Language :: Python :: 3 | ||
Programming Language :: Python :: 3.7 | ||
Programming Language :: Python :: 3.8 | ||
Programming Language :: Python :: 3.9 | ||
Programming Language :: Python :: Implementation :: CPython | ||
Topic :: Software Development :: Libraries :: Python Modules | ||
keywords = | ||
python | ||
sparql | ||
rdf | ||
rdflib | ||
project_urls = | ||
Home = https://rdflib.github.io/sparqlwrapper | ||
Documentation = https://sparqlwrapper.readthedocs.io | ||
Source = https://github.com/RDFLib/sparqlwrapper | ||
Tracker = https://github.com/RDFLib/sparqlwrapper/issues | ||
|
||
[options] | ||
packages = | ||
SPARQLWrapper | ||
include_package_data = True | ||
install_requires = | ||
rdflib>=6.1.1 | ||
python_requires = >= 3.7 | ||
|
||
[options.extras_require] | ||
dev = | ||
setuptools>=3.7.1 | ||
keepalive = | ||
keepalive>=0.5 | ||
|
||
[options.entry_points] | ||
console_scripts = | ||
rqw = SPARQLWrapper.main:main |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,76 +1,3 @@ | ||
#!/usr/bin/env python | ||
# -*- coding: utf-8 -*- | ||
|
||
from setuptools import setup | ||
|
||
# metadata | ||
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'): | ||
|
||
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) | ||
|
||
# requirements | ||
with open('requirements.txt', 'r') as f: | ||
_install_requires = [line.rstrip('\n') for line in f] | ||
|
||
with open('requirements.development.txt', 'r') as f: | ||
_install_dev_requires = [line.rstrip('\n') for line in f] | ||
|
||
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', | ||
author=authors, | ||
url=url, | ||
download_url='https://github.com/RDFLib/sparqlwrapper/releases', | ||
platforms=['any'], | ||
python_requires='>=3.7', | ||
packages=['SPARQLWrapper'], | ||
install_requires=_install_requires, | ||
extras_require={ | ||
'dev': _install_dev_requires, | ||
'keepalive': ['keepalive>=0.5'], | ||
}, | ||
classifiers=[ | ||
'Development Status :: 5 - Production/Stable', | ||
'Intended Audience :: Developers', | ||
'License :: OSI Approved :: W3C License', | ||
'Operating System :: OS Independent', | ||
'Programming Language :: Python :: 3', | ||
'Programming Language :: Python :: 3.7', | ||
'Programming Language :: Python :: 3.8', | ||
'Programming Language :: Python :: 3.9', | ||
'Programming Language :: Python :: Implementation :: CPython', | ||
'Topic :: Software Development :: Libraries :: Python Modules', | ||
], | ||
keywords=['python', 'sparql', 'rdf', 'rdflib'], | ||
project_urls={ | ||
'Home': 'https://rdflib.github.io/sparqlwrapper/', | ||
'Documentation': 'https://sparqlwrapper.readthedocs.io', | ||
'Source': 'https://github.com/RDFLib/sparqlwrapper', | ||
'Tracker': 'https://github.com/RDFLib/sparqlwrapper/issues', | ||
}, | ||
entry_points={ | ||
'console_scripts': [ | ||
'rqw=SPARQLWrapper.main:main' | ||
] | ||
} | ||
) | ||
setup() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should be uploading wheels also, but fine as is as it already improves on previous commands.