Browse Source

fix MANIFEST.in rendering of py.typed file

shut-new-model
Niklas Rosenstein 9 months ago
parent
commit
e53cec7c60
No known key found for this signature in database GPG Key ID: 6D269B33D25F6C6
1 changed files with 5 additions and 3 deletions
  1. + 5
    - 3
      src/shut/update/setuptools.py

+ 5
- 3
src/shut/update/setuptools.py

@ -185,9 +185,6 @@ class SetuptoolsRenderer(Renderer[PackageModel]):
else:
extras_require = '{}'
# TODO(NiklasRosenstein): Data files support
data_files = '[]'
exclude_packages = []
for pkg in data.exclude:
exclude_packages.append(pkg)
@ -207,6 +204,10 @@ class SetuptoolsRenderer(Renderer[PackageModel]):
else:
python_requires_expr = 'None'
# TODO: data_files/package_data
# TODO: py.typed must be included in package_data (or include_package_data=True)
data_files = '[]'
# Write the setup function.
fp.write(textwrap.dedent('''
setuptools.setup(
@ -364,6 +365,7 @@ class SetuptoolsRenderer(Renderer[PackageModel]):
if package.data.typed:
directory = package.get_python_package_metadata().package_directory
directory = os.path.relpath(directory, package.get_directory())
manifest.append('include ' + os.path.join(directory, 'py.typed'))
markers = (self._BEGIN_SECTION, self._END_SECTION)

Loading…
Cancel
Save