diff --git a/bin/swh-deposit b/bin/swh-deposit new file mode 100755 index 00000000..826cf3dc --- /dev/null +++ b/bin/swh-deposit @@ -0,0 +1,3 @@ +#!/usr/bin/env bash + +python3 -m swh.deposit.client.cli $@ diff --git a/debian/control b/debian/control index 6503a32f..5bb1ce24 100644 --- a/debian/control +++ b/debian/control @@ -1,46 +1,56 @@ Source: swh-deposit Maintainer: Software Heritage developers Section: python Priority: optional Build-Depends: debhelper (>= 9), dh-python (>= 2), python3-setuptools, python3-all, python3-nose, python3-django-nose, python3-vcversioner, python3-swh.core (>= 0.0.36~), python3-swh.model (>= 0.0.21~), python3-swh.loader.core (>= 0.0.27~), python3-swh.loader.tar (>= 0.0.32~), python3-swh.scheduler (>= 0.0.19~), python3-django, python3-click, python3-vcversioner, python3-djangorestframework, python3-djangorestframework-xml, python3-requests, + python3-lxml, patool Standards-Version: 3.9.6 Homepage: https://forge.softwareheritage.org/source/swh-deposit/ Package: python3-swh.deposit Architecture: all Depends: python3-swh.core (>= 0.0.36~), python3-swh.model (>= 0.0.21~), python3-swh.scheduler (>= 0.0.19~), patool, ${misc:Depends}, ${python3:Depends} Description: Software Heritage Deposit Server +Package: python3-swh.deposit.client +Architecture: all +Depends: python3-swh.core (>= 0.0.36~), + python3-swh.model (>= 0.0.21~), + python3-requests, + python3-lxml, + ${misc:Depends}, ${python3:Depends} +Description: Software Heritage Deposit Api Client + Package: python3-swh.deposit.loader Conflict: python3-swh.deposit.injection Architecture: all -Depends: python3-swh.core (>= 0.0.36~), +Depends: python3-swh.deposit.client (= ${binary:Version}), + python3-swh.core (>= 0.0.36~), python3-swh.model (>= 0.0.21~), python3-swh.loader.core (>= 0.0.27~), python3-swh.loader.tar (>= 0.0.32~), python3-swh.scheduler (>= 0.0.19~), - python3-requests, ${misc:Depends}, ${python3:Depends} Description: Software Heritage Deposit Loader diff --git a/debian/rules b/debian/rules index a4600d2a..77f54459 100755 --- a/debian/rules +++ b/debian/rules @@ -1,19 +1,22 @@ #!/usr/bin/make -f export PYBUILD_NAME=swh.deposit export PYBUILD_TEST_ARGS=--with-doctest -sv -a !db,!fs %: dh $@ --with python3 --buildsystem=pybuild override_dh_install: dh_install rm -v $(CURDIR)/debian/python3-*/usr/lib/python*/dist-packages/swh/__init__.py for pyvers in $(shell py3versions -vr); do \ mkdir -p $(CURDIR)/debian/python3-swh.deposit.loader/usr/lib/python$$pyvers/dist-packages/swh/deposit/loader ; \ mv $(CURDIR)/debian/python3-swh.deposit/usr/lib/python$$pyvers/dist-packages/swh/deposit/loader/* \ $(CURDIR)/debian/python3-swh.deposit.loader/usr/lib/python$$pyvers/dist-packages/swh/deposit/loader/ ; \ + mkdir -p $(CURDIR)/debian/python3-swh.deposit.client/usr/lib/python$$pyvers/dist-packages/swh/deposit/client ; \ + mv $(CURDIR)/debian/python3-swh.deposit/usr/lib/python$$pyvers/dist-packages/swh/deposit/client/* \ + $(CURDIR)/debian/python3-swh.deposit.client/usr/lib/python$$pyvers/dist-packages/swh/deposit/client/ ; \ done override_dh_auto_test: diff --git a/requirements.txt b/requirements.txt index ac9fbfe5..0d52e480 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,6 @@ vcversioner click Django djangorestframework djangorestframework-xml +lxml diff --git a/setup.py b/setup.py index 7dabf5d6..cfbbc0ca 100644 --- a/setup.py +++ b/setup.py @@ -1,33 +1,29 @@ from setuptools import setup, find_packages def parse_requirements(): requirements = [] for reqf in ('requirements.txt', 'requirements-swh.txt'): with open(reqf) as f: for line in f.readlines(): line = line.strip() if not line or line.startswith('#'): continue requirements.append(line) return requirements setup( name='swh.deposit', description='Software Heritage Deposit Server', author='Software Heritage developers', author_email='swh-devel@inria.fr', url='https://forge.softwareheritage.org/source/swh-deposit/', packages=find_packages(), - scripts=[], # scripts to package + scripts=['bin/swh-deposit'], # scripts to package install_requires=parse_requirements(), - extras_require={ - 'loader': ['swh.loader.core >= 0.0.25', - 'swh.scheduler >= 0.0.19', - 'requests'], - }, + extras_require={}, setup_requires=['vcversioner'], vcversioner={}, include_package_data=True, )