Skip to content
This repository has been archived by the owner on Jan 12, 2023. It is now read-only.

Commit

Permalink
Merge bae4e5b into 5800c99
Browse files Browse the repository at this point in the history
  • Loading branch information
c-w committed Feb 19, 2017
2 parents 5800c99 + bae4e5b commit 360b4c5
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 11 deletions.
2 changes: 1 addition & 1 deletion requirements.pip
Expand Up @@ -3,4 +3,4 @@ rdflib>=4.2.0
requests>=2.5.1
six>=1.10.0
setuptools>=18.5
git+https://github.com/RDFLib/rdflib-sqlalchemy.git@20fbf1fbbdbc53917bfd7554f38d22d08e71e225
git+https://github.com/RDFLib/rdflib-sqlalchemy.git@20fbf1fbbdbc53917bfd7554f38d22d08e71e225#egg=rdflib-sqlalchemy-0.2.dev0
34 changes: 24 additions & 10 deletions setup.py
Expand Up @@ -13,20 +13,33 @@ def requirements_for(version=None):
pip_path = 'requirements%s.pip' % suffix

if not isfile(pip_path):
return set()
return set(), set()

requirements = set()
links = set()
with open(pip_path) as pip_file:
requirements = set(line.strip() for line in pip_file)
return requirements


def install_requires():
return requirements_for() | requirements_for(version_info.major)

for line in pip_file:
line = line.strip()
if '#egg=' in line:
requirement_parts = line.split('#egg=')[-1].split('-')
version = requirement_parts[-1]
library = '-'.join(requirement_parts[:-1])
requirement = '%s==%s' % (library, version)
requirements.add(requirement)
links.add(line)
else:
requirements.add(line)
return requirements, links


requirements_general, links_general = requirements_for()
requirements_version, links_version = requirements_for(version_info.major)
install_requires = requirements_general | requirements_version
dependency_links = links_general | links_version

setup(
name='Gutenberg',
version='0.4.3',
version='0.4.5',
author='Clemens Wolff',
author_email='clemens.wolff+pypi@gmail.com',
packages=find_packages(exclude=['tests']),
Expand All @@ -35,4 +48,5 @@ def install_requires():
license='LICENSE.txt',
description='Library to interface with Project Gutenberg',
long_description=open('README.rst').read(),
install_requires=install_requires())
dependency_links=dependency_links,
install_requires=install_requires)

0 comments on commit 360b4c5

Please sign in to comment.