Skip to content
Snippets Groups Projects
Verified Commit f22dfe2b authored by Antoine R. Dumont's avatar Antoine R. Dumont
Browse files

setup.py: Remove sdisk build warning about importable packages

This fixes the sdist build warnings about importable packages (swh.vault.sql,
swh.vault.sql.upgrades). [1]

This aligns with the swh.storage's setup.py.

[1] for package in swh.vault.sql swh.vault.sql.upgrades
```
    ############################
    # Package would be ignored #
    ############################
    Python recognizes '$package' as an importable package,
    but it is not listed in the `packages` configuration of setuptools.

    '$package' has been automatically added to the distribution only
    because it may contain data files, but this behavior is likely to change
    in future versions of setuptools (and therefore is considered deprecated).

    Please make sure that '$package' is included as a package by using
    the `packages` configuration field or the proper discovery methods
    (for example by using `find_namespace_packages(...)`/`find_namespace:`
    instead of `find_packages(...)`/`find:`).

    You can read more about "package discovery" and "data files" on setuptools
    documentation page.
```

Refs. swh/infra/sysadm-environment#5044
parent e8fa9a45
No related branches found
Tags v1.9.1
No related merge requests found
#!/usr/bin/env python3
# Copyright (C) 2015-2020 The Software Heritage developers
# Copyright (C) 2015-2023 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
......@@ -7,7 +7,7 @@
from io import open
from os import path
from setuptools import find_packages, setup
from setuptools import find_namespace_packages, setup
here = path.abspath(path.dirname(__file__))
......@@ -44,7 +44,7 @@ setup(
author="Software Heritage developers",
author_email="swh-devel@inria.fr",
url="https://forge.softwareheritage.org/diffusion/DVAU/",
packages=find_packages(),
packages=find_namespace_packages(include=["swh", "swh.*"]),
install_requires=parse_requirements() + parse_requirements("swh"),
setup_requires=["setuptools-scm"],
use_scm_version=True,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment