-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
42 lines (38 loc) · 1.33 KB
/
setup.py
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
import sys
from setuptools import setup, find_packages
def get_version(rel_path):
import os
for line in open(rel_path):
if line.startswith('__version__'):
delim = '"' if '"' in line else "'"
return line.split(delim)[1]
else:
raise RuntimeError("Unable to find version string.")
requirements = []
with open('requirements.txt', 'rt') as f:
for req in f.read().splitlines():
if req.startswith('git+'):
pkg_name = req.split('/')[-1].replace('.git', '')
if "#egg=" in pkg_name:
pkg_name = pkg_name.split("#egg=")[1]
requirements.append("%s @ %s" % (pkg_name, req))
else:
requirements.append(req)
setup(
name="pyterrier-quality",
version=get_version("pyterrier_quality/__init__.py"),
author="Sean MacAvaney",
author_email='[email protected]',
description="Content Quality Estimation for PyTerrier",
long_description=open('README.md').read(),
long_description_content_type="text/markdown",
url="https://github.com/terrierteam/pyterrier-quality",
packages=find_packages(),
install_requires=requirements,
python_requires='>=3.10',
entry_points={
'pyterrier.artifact': [
'quality_score_cache.numpy = pyterrier_quality:QualCache',
],
},
)