|
40 | 40 | 'pyfakefs==4.5.6', |
41 | 41 | 'pytest-xdist==2.5.0', |
42 | 42 | ] |
43 | | -REQUIREMENTS_BUILD = ['setuptools>=20.2'] |
| 43 | +REQUIREMENTS_BUILD = ['setuptools>=20.2', 'wheel>=0.40'] |
44 | 44 |
|
45 | 45 | nox.options.reuse_existing_virtualenvs = True |
46 | 46 | nox.options.sessions = [ |
@@ -169,22 +169,21 @@ def cover(session): |
169 | 169 | @nox.session(python=PYTHON_DEFAULT_VERSION) |
170 | 170 | def build(session): |
171 | 171 | """Build the distribution.""" |
172 | | - # TODO: consider using wheel as well |
173 | 172 | session.run('pip', 'install', *REQUIREMENTS_BUILD) |
174 | 173 | session.run('python', 'setup.py', 'check', '--metadata', '--strict') |
175 | 174 | session.run('rm', '-rf', 'build', 'dist', 'b2sdk.egg-info', external=True) |
176 | 175 | session.run('python', 'setup.py', 'sdist', *session.posargs) |
| 176 | + session.run('python', 'setup.py', 'bdist_wheel', *session.posargs) |
177 | 177 |
|
178 | 178 | # Set outputs for GitHub Actions |
179 | 179 | if CI: |
180 | | - asset_path = glob('dist/*')[0] |
181 | | - print('::set-output name=asset_path::', asset_path, sep='') |
| 180 | + with open(os.environ['GITHUB_OUTPUT'], 'a') as github_output: |
| 181 | + # Path have to be specified with unix style slashes even for windows, |
| 182 | + # otherwise glob won't find files on windows in action-gh-release. |
| 183 | + print('asset_path=dist/*', file=github_output) |
182 | 184 |
|
183 | | - asset_name = os.path.basename(asset_path) |
184 | | - print('::set-output name=asset_name::', asset_name, sep='') |
185 | | - |
186 | | - version = os.environ['GITHUB_REF'].replace('refs/tags/v', '') |
187 | | - print('::set-output name=version::', version, sep='') |
| 185 | + version = os.environ['GITHUB_REF'].replace('refs/tags/v', '') |
| 186 | + print(f'version={version}', file=github_output) |
188 | 187 |
|
189 | 188 |
|
190 | 189 | @nox.session(python=PYTHON_DEFAULT_VERSION) |
|
0 commit comments