From 574fb3c3e7d33a7042c43d583223693678afe748 Mon Sep 17 00:00:00 2001 From: Maxwell G Date: Nov 27 2023 16:17:16 +0000 Subject: [PATCH 1/2] Improve setuptools package discovery Using find_packages: and including `__init__.py`s in all subpackages eliminates the need to manually list packages. --- diff --git a/cargo2rpm/testdata/__init__.py b/cargo2rpm/testdata/__init__.py new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/cargo2rpm/testdata/__init__.py diff --git a/cargo2rpm/tests/__init__.py b/cargo2rpm/tests/__init__.py new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/cargo2rpm/tests/__init__.py diff --git a/cargo2rpm/tests/metadata/__init__.py b/cargo2rpm/tests/metadata/__init__.py new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/cargo2rpm/tests/metadata/__init__.py diff --git a/cargo2rpm/tests/rpm/__init__.py b/cargo2rpm/tests/rpm/__init__.py new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/cargo2rpm/tests/rpm/__init__.py diff --git a/cargo2rpm/tests/semver/__init__.py b/cargo2rpm/tests/semver/__init__.py new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/cargo2rpm/tests/semver/__init__.py diff --git a/setup.cfg b/setup.cfg index 84e356a..dd15e75 100644 --- a/setup.cfg +++ b/setup.cfg @@ -23,12 +23,7 @@ classifiers = [options] include_package_data = True -packages = - cargo2rpm - cargo2rpm.tests - cargo2rpm.tests.metadata - cargo2rpm.tests.rpm - cargo2rpm.tests.semver +packages = find: [options.entry_points] console_scripts = From 8065556d65d8ae556d998eb692506bf997322d5e Mon Sep 17 00:00:00 2001 From: Maxwell G Date: Nov 27 2023 16:17:16 +0000 Subject: [PATCH 2/2] setup.cfg: set long_description_content_type setup.cfg configuration does not automatically determine that the content_type is text/markdown when the file ends in `.md`, so you have to specify it manually for PyPI to properly display the README. --- diff --git a/setup.cfg b/setup.cfg index dd15e75..cc82134 100644 --- a/setup.cfg +++ b/setup.cfg @@ -3,6 +3,7 @@ name = cargo2rpm version = attr: cargo2rpm.__version__ description = Translation layer between cargo and RPM long_description = file: README.md +long_description_content_type = text/markdown keywords = rpm, cargo, rust license = MIT url = https://pagure.io/fedora-rust/cargo2rpm