Browse Source

add Package.wheel field, setuptools:wheel is no longer advertised if that is set to False

shut
Niklas Rosenstein 10 months ago
parent
commit
e2f5beef3e
No known key found for this signature in database GPG Key ID: 6D269B33D25F6C6
2 changed files with 5 additions and 1 deletions
  1. + 3
    - 0
      src/shore/model.py
  2. + 2
    - 1
      src/shore/plugins/setuptools.py

+ 3
- 0
src/shore/model.py

@ -738,6 +738,9 @@ class Package(BaseObject):
#: data.
typed = Field(bool, default=False)
#: Advertise a "setuptools:wheel" build target for the package. Defaults to True.
wheel = Field(bool, default=True)
@property
def local_name(self) -> str:
if self.monorepo:

+ 2
- 1
src/shore/plugins/setuptools.py

@ -150,7 +150,8 @@ class SetuptoolsRenderer:
@override
def get_package_build_targets(self, package: Package) -> Iterable[IBuildTarget]:
yield SetuptoolsBuildTarget('sdist', 'sdist', package)
yield SetuptoolsBuildTarget('wheel', 'bdist_wheel', package)
if package.wheel:
yield SetuptoolsBuildTarget('wheel', 'bdist_wheel', package)
_BEGIN_SECTION = '# Auto-generated with shore. Do not edit. {'
_END_SECTION = '# }'

Loading…
Cancel
Save