Changeset View
Changeset View
Standalone View
Standalone View
setup.py
Property | Old Value | New Value |
---|---|---|
File Mode | 100644 | 100755 |
import hashlib | #!/usr/bin/env python3 | ||||
# Copyright (C) 2015-2018 The Software Heritage developers | |||||
# See the AUTHORS file at the top-level directory of this distribution | |||||
# License: GNU General Public License version 3, or any later version | |||||
# See top-level LICENSE file for more information | |||||
from setuptools import setup, find_packages | from setuptools import setup, find_packages | ||||
import hashlib | |||||
from os import path | |||||
from io import open | |||||
here = path.abspath(path.dirname(__file__)) | |||||
# Get the long description from the README file | |||||
with open(path.join(here, 'README.md'), encoding='utf-8') as f: | |||||
ardumont: We probably should also add this to the default swh-py-template repository. | |||||
long_description = f.read() | |||||
def parse_requirements(): | def parse_requirements(): | ||||
requirements = [] | requirements = [] | ||||
for reqf in ('requirements.txt', 'requirements-swh.txt'): | for reqf in ('requirements.txt', 'requirements-swh.txt'): | ||||
with open(reqf) as f: | with open(reqf) as f: | ||||
for line in f.readlines(): | for line in f.readlines(): | ||||
line = line.strip() | line = line.strip() | ||||
Show All 20 Lines | |||||
else: | else: | ||||
# None of the possible sets of blake2 hashes are available. | # None of the possible sets of blake2 hashes are available. | ||||
# use pyblake2 instead | # use pyblake2 instead | ||||
extra_requirements.append('pyblake2') | extra_requirements.append('pyblake2') | ||||
setup( | setup( | ||||
name='swh.model', | name='swh.model', | ||||
description='Software Heritage data model', | description='Software Heritage data model', | ||||
long_description=long_description, | |||||
long_description_content_type='text/markdown', | |||||
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/diffusion/DMOD/', | url='https://forge.softwareheritage.org/diffusion/DMOD/', | ||||
packages=find_packages(), # packages's modules | packages=find_packages(), # packages's modules | ||||
scripts=[], # scripts to package | scripts=[], # scripts to package | ||||
install_requires=parse_requirements() + extra_requirements, | install_requires=parse_requirements() + extra_requirements, | ||||
setup_requires=['vcversioner'], | |||||
vcversioner={}, | |||||
include_package_data=True, | |||||
entry_points=''' | entry_points=''' | ||||
[console_scripts] | [console_scripts] | ||||
swh-identify=swh.model.cli:identify | swh-identify=swh.model.cli:identify | ||||
''', | ''', | ||||
setup_requires=['vcversioner'], | classifiers=[ | ||||
vcversioner={}, | "Programming Language :: Python :: 3", | ||||
include_package_data=True, | "Intended Audience :: Developers", | ||||
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)", | |||||
"Operating System :: OS Independent", | |||||
"Development Status :: 5 - Production/Stable", | |||||
], | |||||
project_urls={ | |||||
'Bug Reports': 'https://forge.softwareheritage.org/maniphest', | |||||
'Funding': 'https://www.softwareheritage.org/donate', | |||||
'Source': 'https://forge.softwareheritage.org/source/swh-model', | |||||
}, | |||||
) | ) |
We probably should also add this to the default swh-py-template repository.