Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
Erotemic committed Sep 9, 2024
1 parent 9d366d2 commit 1fb3261
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
11 changes: 10 additions & 1 deletion xcookie/builders/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,16 @@ def build_setup(self):
setupkw_parts['classifiers'] = f'{classifier_text}'

package_data = {}
package_data[''] = ['requirements/*.txt']
package_data[''] = [
'requirements/*.txt'
]
package_data[f'{self.mod_name}.rc.requirements'] = [
'docs.txt',
'optional.txt',
'runtime.txt',
'tests.txt',
]

if self.config['typed']:
package_data[self.mod_name] = ['py.typed', '*.pyi']

Expand Down
5 changes: 5 additions & 0 deletions xcookie/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -290,9 +290,12 @@ def __post_init__(self):
self['description'] = 'The {} module'.format(self['mod_name'])

if self['supported_python_versions'] == 'auto':
# FIXME: need to resolve after all other info is loaded
from xcookie.constants import KNOWN_PYTHON_VERSIONS
min_python = str(self['min_python']).lower()
max_python = str(self['max_python']).lower()
print(f'min_python={min_python}')
print(f'max_python={max_python}')

def satisfies_minmax(v):
v = Version(v)
Expand All @@ -308,6 +311,8 @@ def satisfies_minmax(v):

python_versions = [v for v in KNOWN_PYTHON_VERSIONS
if satisfies_minmax(v)]
print(f'KNOWN_PYTHON_VERSIONS={KNOWN_PYTHON_VERSIONS}')
print(f'python_versions={python_versions}')
self['supported_python_versions'] = python_versions

if self['ci_cpython_versions'] == 'auto':
Expand Down

0 comments on commit 1fb3261

Please sign in to comment.