From 4b7792e02b7bc8c7c706556900fe34d90b58980a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Gl=C3=A4=C3=9Fle?= Date: Fri, 27 Dec 2024 10:49:05 +0100 Subject: [PATCH] List packages explicitly --- pyproject.toml | 3 ++- setup.py | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 0e5632f5..340ef5bc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -65,6 +65,7 @@ requires = [ [tool.setuptools] dynamic.version.attr = "cpymad.__version__" -packages.find = {where = ["src"], include = ["cpymad*"]} +packages = ["cpymad", "cpymad.COPYING"] +package-dir = {"" = "src"} package-data = {"cpymad.COPYING" = ["*.rst"]} include-package-data = false diff --git a/setup.py b/setup.py index 0ebbc053..0d5cb3c0 100644 --- a/setup.py +++ b/setup.py @@ -19,7 +19,7 @@ # at the commit that first added this paragraph (can be identified using `git # blame`) and the simplifications that were possible in the following commits. -from setuptools import setup, find_packages, Extension +from setuptools import setup, Extension from distutils.util import get_platform from distutils import sysconfig from argparse import ArgumentParser @@ -145,7 +145,7 @@ def get_extension_args(madxdir, shared, static, **libs): sources=["src/cpymad/libmadx.pyx"], **get_extension_args(**options.__dict__)), ]), - packages=find_packages('src', include='cpymad*'), + packages=['cpymad', 'cpymad.COPYING'], package_dir={'': 'src'}, zip_safe=False, # zip is bad for redistributing shared libs include_package_data=True, # include files matched by MANIFEST.in