Changeset View
Changeset View
Standalone View
Standalone View
setup.py
#!/usr/bin/env python3 | #!/usr/bin/env python3 | ||||
# Copyright (C) 2015-2018 The Software Heritage developers | # Copyright (C) 2015-2018 The Software Heritage developers | ||||
# See the AUTHORS file at the top-level directory of this distribution | # See the AUTHORS file at the top-level directory of this distribution | ||||
# License: GNU General Public License version 3, or any later version | # License: GNU General Public License version 3, or any later version | ||||
# See top-level LICENSE file for more information | # See top-level LICENSE file for more information | ||||
from io import open | from io import open | ||||
from os import path | from os import path | ||||
from setuptools import find_packages, setup | from setuptools import find_packages, setup | ||||
here = path.abspath(path.dirname(__file__)) | here = path.abspath(path.dirname(__file__)) | ||||
# Get the long description from the README file | # Get the long description from the README file | ||||
with open(path.join(here, "README.md"), encoding="utf-8") as f: | with open(path.join(here, "README.rst"), encoding="utf-8") as f: | ||||
long_description = f.read() | long_description = f.read() | ||||
def parse_requirements(name=None): | def parse_requirements(name=None): | ||||
if name: | if name: | ||||
reqf = "requirements-%s.txt" % name | reqf = "requirements-%s.txt" % name | ||||
else: | else: | ||||
reqf = "requirements.txt" | reqf = "requirements.txt" | ||||
Show All 10 Lines | with open(reqf) as f: | ||||
requirements.append(line) | requirements.append(line) | ||||
return requirements | return requirements | ||||
setup( | setup( | ||||
name="swh.dataset", | name="swh.dataset", | ||||
description="Software Heritage dataset tools", | description="Software Heritage dataset tools", | ||||
long_description=long_description, | long_description=long_description, | ||||
long_description_content_type="text/markdown", | long_description_content_type="text/x-rst", | ||||
author="Software Heritage developers", | author="Software Heritage developers", | ||||
author_email="swh-devel@inria.fr", | author_email="swh-devel@inria.fr", | ||||
url="https://forge.softwareheritage.org/source/swh-dataset/", | url="https://forge.softwareheritage.org/source/swh-dataset/", | ||||
packages=find_packages(), # packages's modules | packages=find_packages(), # packages's modules | ||||
install_requires=parse_requirements() + parse_requirements("swh"), | install_requires=parse_requirements() + parse_requirements("swh"), | ||||
tests_require=parse_requirements("test"), | tests_require=parse_requirements("test"), | ||||
entry_points=""" | entry_points=""" | ||||
[swh.cli.subcommands] | [swh.cli.subcommands] | ||||
Show All 20 Lines |