Open kloczek opened 7 months ago
I noticed this while trying to update the Fedora package.
I couldn’t find any documentation on how to control this with the PDM build backend, so I worked around it downstream rather than offering a PR to fix it properly.
IIRC exclude/include placed in pyproject.toml should be honored as well as it is defined IIRC by some PEP. If not I'm not sure but maybe use MANIFEST.in file works with `pdm-backed' as well. 🤔
Looks like .cpp, .h, .pyx and even .gitignore are packaged.
build output
```console + /usr/bin/python3 -sBm build -w --no-isolation * Getting build dependencies for wheel... * Building wheel... running build running build_py creating /tmp/pdm-build-dj8et6ut/lib.linux-x86_64-cpython-38 creating /tmp/pdm-build-dj8et6ut/lib.linux-x86_64-cpython-38/editdistance copying src/editdistance/__init__.py -> /tmp/pdm-build-dj8et6ut/lib.linux-x86_64-cpython-38/editdistance running egg_info creating src/editdistance.egg-info writing src/editdistance.egg-info/PKG-INFO writing dependency_links to src/editdistance.egg-info/dependency_links.txt writing top-level names to src/editdistance.egg-info/top_level.txt writing manifest file 'src/editdistance.egg-info/SOURCES.txt' reading manifest file 'src/editdistance.egg-info/SOURCES.txt' adding license file 'LICENSE' writing manifest file 'src/editdistance.egg-info/SOURCES.txt' copying src/editdistance/__init__.pxd -> /tmp/pdm-build-dj8et6ut/lib.linux-x86_64-cpython-38/editdistance <<<=== HERE copying src/editdistance/_editdistance.cpp -> /tmp/pdm-build-dj8et6ut/lib.linux-x86_64-cpython-38/editdistance <<<=== HERE copying src/editdistance/_editdistance.h -> /tmp/pdm-build-dj8et6ut/lib.linux-x86_64-cpython-38/editdistance <<<=== HERE copying src/editdistance/bycython.cpp -> /tmp/pdm-build-dj8et6ut/lib.linux-x86_64-cpython-38/editdistance <<<=== HERE copying src/editdistance/bycython.pxd -> /tmp/pdm-build-dj8et6ut/lib.linux-x86_64-cpython-38/editdistance <<<=== HERE copying src/editdistance/bycython.pyx -> /tmp/pdm-build-dj8et6ut/lib.linux-x86_64-cpython-38/editdistance <<<=== HERE copying src/editdistance/def.h -> /tmp/pdm-build-dj8et6ut/lib.linux-x86_64-cpython-38/editdistance <<<=== HERE copying src/editdistance/__init__.py -> /tmp/pdm-build-dj8et6ut/lib.linux-x86_64-cpython-38/editdistance running build_ext building 'editdistance.bycython' extension creating /tmp/pdm-build-dj8et6ut/temp.linux-x86_64-cpython-38 creating /tmp/pdm-build-dj8et6ut/temp.linux-x86_64-cpython-38/src creating /tmp/pdm-build-dj8et6ut/temp.linux-x86_64-cpython-38/src/editdistance /usr/bin/gcc -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fdata-sections -ffunction-sections -flto=auto -flto-partition=none -D_GNU_SOURCE -fPIC -fwrapv -ffat-lto-objects -fno-semantic-interposition -D_GNU_SOURCE -fPIC -fwrapv -O2 -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fdata-sections -ffunction-sections -flto=auto -flto-partition=none -D_GNU_SOURCE -fPIC -fwrapv -ffat-lto-objects -fno-semantic-interposition -O2 -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fdata-sections -ffunction-sections -flto=auto -flto-partition=none -D_GNU_SOURCE -fPIC -fwrapv -ffat-lto-objects -fno-semantic-interposition -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -O2 -g -grecord-gcc-switches -pipe -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fdata-sections -ffunction-sections -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -flto=auto -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -Wall -Werror=format-security -fPIC -Isrc/editdistance -I/usr/include/python3.8 -c src/editdistance/_editdistance.cpp -o /tmp/pdm-build-dj8et6ut/temp.linux-x86_64-cpython-38/src/editdistance/_editdistance.o In member function ‘varr<1ul>::operator[](unsigned long const&)’, inlined from ‘edit_distance_bpvIn above output is possible to find compile time warnings as well.