Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 23 additions & 27 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,41 +4,37 @@
Setup script for the Python implementation of LD Patch
"""

from setuptools import setup
from setuptools import setup, find_packages

from ast import literal_eval
#from ast import literal_eval

def get_version(source='hydra/__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")
try: # for pip >= 10
from pip._internal.req import parse_requirements
from pip._internal.download import PipSession
except ImportError: # for pip <= 9.0.3
from pip.req import parse_requirements
from pip.download import PipSession

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] != "#" ]
install_requires = parse_requirements('requirements.txt', session=PipSession())
dependencies = [str(package.req) for package in install_requires]


setup(name = 'python-hydra-agent',
version = get_version(),
packages = ['hydra'],
include_package_data=True,
version = '0.0.1',
description = 'A Hydra implementation for Python',
long_description = README,
author='W3C Hydra Contributors',
author_email='public-hydra@w3.org',
license='LGPL v3',
platforms='OS Independant',
url='https://github.com/HTTP-APIs/python-hydra-agent',
include_package_data=True,
install_requires=INSTALL_REQ,
scripts=[],
)
python_requires='>=3',
install_requires=dependencies,
packages=find_packages(
exclude=['hydra','examples','test*','python_hydra_agent.egg-info']),
package_dir = {'hydra_redis':
'hydra_redis'},


license='LGPL v3',

)