diff --git a/debian/control b/debian/control index e5c0968ce..981bdd219 100644 --- a/debian/control +++ b/debian/control @@ -1,31 +1,31 @@ Source: swh-web Maintainer: Software Heritage developers Section: python Priority: optional Build-Depends: debhelper (>= 9), - dh-python, + dh-python (>= 2), python3-all, python3-docutils, python3-nose, python3-django, python3-djangorestframework, python3-pygments, python3-setuptools, python3-yaml, python3-magic, python3-sphinx, python3-sphinxcontrib.httpdomain, python3-swh.core (>= 0.0.20~), python3-swh.model (>= 0.0.15~), python3-swh.storage (>= 0.0.83~) Standards-Version: 3.9.6 Homepage: https://forge.softwareheritage.org/diffusion/DWUI/ Package: python3-swh.web Architecture: all Depends: python3-swh.core (>= 0.0.20~), python3-swh.model (>= 0.0.15~), python3-swh.storage (>= 0.0.83~), ${misc:Depends}, ${python3:Depends} Description: Software Heritage Web Applications diff --git a/debian/rules b/debian/rules index e310b0342..2c829c163 100755 --- a/debian/rules +++ b/debian/rules @@ -1,12 +1,11 @@ #!/usr/bin/make -f -export PYBUILD_NAME=swh-web -TEST_DIRS := $(shell find swh -name tests -type d) +export PYBUILD_NAME=swh.web +export PYBUILD_TEST_ARGS=--with-doctest -sv -a !db,!fs %: dh $@ --with python3 --buildsystem=pybuild -override_dh_auto_test: - PYBUILD_SYSTEM=custom \ - PYBUILD_TEST_ARGS="cd {build_dir}; python{version} -m nose $(TEST_DIRS) -sva '!db'" \ - dh_auto_test +override_dh_install: + dh_install + rm -v $(CURDIR)/debian/python3-*/usr/lib/python*/dist-packages/swh/__init__.py diff --git a/setup.py b/setup.py index 17aa8d8bd..20f5e5181 100755 --- a/setup.py +++ b/setup.py @@ -1,36 +1,30 @@ #!/usr/bin/env python3 -from setuptools import setup +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.web', description='Software Heritage Web UI', author='Software Heritage developers', author_email='swh-devel@inria.fr', url='https://forge.softwareheritage.org/diffusion/DWUI/', - packages=['swh.web', 'swh.web.common', 'swh.web.settings', - 'swh.web.api', 'swh.web.api.views', - 'swh.web.tests', 'swh.web.tests.api', - 'swh.web.tests.api.views', - 'swh.web.tests.common', 'swh.web.browse', - 'swh.web.browse.views', 'swh.web.tests.browse', - 'swh.web.tests.browse.views', 'swh.web.tests.browse.views.data'], + packages=find_packages(), scripts=[], install_requires=parse_requirements(), setup_requires=['vcversioner'], vcversioner={}, include_package_data=True, ) diff --git a/swh/__init__.py b/swh/__init__.py new file mode 100644 index 000000000..69e3be50d --- /dev/null +++ b/swh/__init__.py @@ -0,0 +1 @@ +__path__ = __import__('pkgutil').extend_path(__path__, __name__)