Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove dependency on wheel package in setup.py (was: build fails ...) #3112

Closed
KSchopmeyer opened this issue Mar 2, 2024 · 4 comments · Fixed by #3110
Closed

Remove dependency on wheel package in setup.py (was: build fails ...) #3112

KSchopmeyer opened this issue Mar 2, 2024 · 4 comments · Fixed by #3110
Assignees
Milestone

Comments

@KSchopmeyer
Copy link
Collaborator

KSchopmeyer commented Mar 2, 2024

The build step of github fails with the latest version of the build package (version 1.1.1 released 1 March). Note that version 1.1.0 was released a couple of days earlier but pulled because of an issue.

It fails at the step:

python -m build --wheel --outdir dist -C--universal .

and with the messages:

  ImportError: wheel package is not installed and bdist_wheel command is used
  
  ERROR Backend subprocess exited when trying to invoke get_requires_for_build_wheel
  make: *** [Makefile:678: dist/pywbem-1.7.0.dev1-py2.py3-none-any.whl] Error 1
  Error: Process completed with exit code 2.

In particular this release includes PR pypa/build#716 (Stop injecting wheel as a build dep fallback)

@KSchopmeyer KSchopmeyer added this to the 1.7.0 milestone Mar 2, 2024
@KSchopmeyer KSchopmeyer self-assigned this Mar 2, 2024
@KSchopmeyer
Copy link
Collaborator Author

The failure in github is:


2s
Run make build
Makefile: Creating the manifest input file
echo "# file GENERATED by Makefile, do NOT edit" >MANIFEST.in
echo "LICENSE.txt README.rst README_PYPI.rst INSTALL.md requirements.txt test-requirements.txt setup.py build_moftab.py mof_compiler mof_compiler.bat pywbem/*.py pywbem_mock/*.py " |xargs -n 1 echo include >>MANIFEST.in
echo "recursive-include tests *" >>MANIFEST.in
echo "recursive-exclude tests *.pyc" >>MANIFEST.in
Makefile: Done creating the manifest input file: MANIFEST.in
Makefile: Creating the LEX/YACC table modules
rm -f pywbem/_mofparsetab.py* pywbem/_moflextab.py*
python -c "from pywbem import _mof_compiler; _mof_compiler._build(verbose=True)"
Building LEX/YACC modules for MOF compiler in: /home/runner/work/pywbem/pywbem/pywbem
Generating LALR tables


Makefile: Done creating the LEX/YACC table modules: pywbem/_mofparsetab.py pywbem/_moflextab.py
Makefile: Creating the normal wheel distribution archive: dist/pywbem-1.7.0.dev1-py2.py3-none-any.whl
rm -f MANIFEST
rm -rf build pywbem.egg-info-INFO .eggs
python -m build --wheel --outdir dist -C--universal .
* Creating virtualenv isolated environment...
* Installing packages in isolated environment... (setuptools >= 40.8.0)
* Getting build dependencies for wheel...
Traceback (most recent call last):
  File "/opt/hostedtoolcache/Python/3.11.8/x64/lib/python3.11/site-packages/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
    main()
  File "/opt/hostedtoolcache/Python/3.11.8/x64/lib/python3.11/site-packages/pyproject_hooks/_in_process/_in_process.py", line 335, in main
    json_out['return_val'] = hook(**hook_input['kwargs'])
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/hostedtoolcache/Python/3.11.8/x64/lib/python3.11/site-packages/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
    return hook(config_settings)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/tmp/build-env-kazuv9lq/lib/python3.11/site-packages/setuptools/build_meta.py", line 325, in get_requires_for_build_wheel
    return self._get_build_requires(config_settings, requirements=['wheel'])
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/tmp/build-env-kazuv9lq/lib/python3.11/site-packages/setuptools/build_meta.py", line 295, in _get_build_requires
    self.run_setup()
  File "/tmp/build-env-kazuv9lq/lib/python3.11/site-packages/setuptools/build_meta.py", line 487, in run_setup
    super().run_setup(setup_script=setup_script)
  File "/tmp/build-env-kazuv9lq/lib/python3.11/site-packages/setuptools/build_meta.py", line 311, in run_setup
    exec(code, locals())
  File "<string>", line 223, in <module>
  File "<string>", line 234, in bdist_wheel
ImportError: wheel package is not installed and bdist_wheel command is used

ERROR Backend subprocess exited when trying to invoke get_requires_for_build_wheel
make: *** [Makefile:678: dist/pywbem-1.7.0.dev1-py2.py3-none-any.whl] Error 1
Error: Process completed with exit code 2.

@KSchopmeyer
Copy link
Collaborator Author

KSchopmeyer commented Mar 2, 2024

The changes incorporated into the new versions of build (1..1.0, 1.1.1 are defined at : https://build.pypa.io/en/stable/changelog.html

and copied below.

Changelog
1.1.1 (2024-02-29)

Fixed invoking outer pip from user site packages (PR [#746](https://github.com/pypa/build/pull/746), fixes issue [#745](https://github.com/pypa/build/issues/745))

Corrected the minimum pip version required to use an outer pip (PR [#746](https://github.com/pypa/build/pull/746), fixes issue [#745](https://github.com/pypa/build/issues/745))

1.1.0 (2024-02-29)

Use external pip if available instead of installing, speeds up environment setup with virtualenv slightly and venv significantly. (PR [#736](https://github.com/pypa/build/pull/736))

Stopped injecting wheel as a build dependency automatically, in the case of missing pyproject.toml – by [@webknjaz](https://github.com/sponsors/webknjaz). (PR [#716](https://github.com/pypa/build/pull/716))

Use importlib_metadata on Python <3.10.2 for bugfixes not present in those CPython standard libraries (not required when bootstrapping) – by [@GianlucaFicarelli](https://github.com/sponsors/GianlucaFicarelli). (PR [#693](https://github.com/pypa/build/pull/693), fixes issue [#692](https://github.com/pypa/build/issues/692))

For the moment the primary suspect is: Stopped injecting wheel as a build dependency automatically, in the case of missing pyproject.toml – by @webknjaz. (PR #716)

@andy-maier
Copy link
Contributor

In PR #3111, the build package was pinned to <1.1.0 in order to circumvent the issue.

Longer term, pywbem should remove its dependency on the wheel package in its setup.py.

@andy-maier andy-maier changed the title build fails with latest version of build package Remove dependency on wheel package in setup.py (was: build fails ...) Mar 4, 2024
@KSchopmeyer
Copy link
Collaborator Author

Bypassed this issue () by moving the version of build back to < 1.0.

When all the other fixes for python 3.12 were includes, the use of build

build>=0.5.1, <1.1.0

caused the builds for at least python 3.12, 3.11, 3.10, ... latest to fail for windows, ubuntu, and macos.

Set build>=0.5.1, <1.0

and it passes CI build step with all of the systems that failed when build < 1.1.0.. I.e. This issue is introduced by build 1.0.3, 1.1.0. In fact, 1.1.0 specifically does the following:

Stopped injecting wheel as a build dependency automatically, in the case of missing pyproject.toml – by @webknjaz. (PR #716)

@KSchopmeyer KSchopmeyer linked a pull request Mar 12, 2024 that will close this issue
KSchopmeyer pushed a commit that referenced this issue Mar 12, 2024
* add new safety fixes to .safety policy and modify
  corresponding versions in requirements.
* New pylint entries to bypass new pylint messages.
* Limit on version of build package. See issue #3112
* Changes to sphinx version limits
* Fixed depencencies for virtualenv and pyinstrument
* Import new versions for pylint and flake8 dependencies
* Changed platformdirs to 2.5.0 on py>=3.7
* Changed tomli to 1.1.0 on py==3.6
* Changed pylint/astroid to 3.0.0 on py>=3.12
* Changed pylint to 3.0.3 and astroid to 3.0.2 on py>=3.12
* Limit version of pytest to < 8.0. Limit pytest version because
  pytest fails many tests with their warnings about
  DepecratedWarnings in pytest version
  8.  See pytest  changelog for more information.
* Modify conftest namedtuple (change exp_result to result)
* Modify cim_type datetime to use datetime.now()
  and remove datetime.utcnow() for all but python 2.7
* Set build package max ver < 1.0 (issue #3112)
KSchopmeyer pushed a commit that referenced this issue Mar 16, 2024
* add new safety fixes to .safety policy and modify
  corresponding versions in requirements.
* New pylint entries to bypass new pylint messages.
* Limit on version of build package. See issue #3112
* Changes to sphinx version limits
* Fixed depencencies for virtualenv and pyinstrument
* Import new versions for pylint and flake8 dependencies
* Changed platformdirs to 2.5.0 on py>=3.7
* Changed tomli to 1.1.0 on py==3.6
* Changed pylint/astroid to 3.0.0 on py>=3.12
* Changed pylint to 3.0.3 and astroid to 3.0.2 on py>=3.12
* Limit version of pytest to < 8.0. Limit pytest version because
  pytest fails many tests with their warnings about
  DepecratedWarnings in pytest version
  8.  See pytest  changelog for more information.
* Modify conftest namedtuple (change exp_result to result)
* Modify cim_type datetime to use datetime.now()
  and remove datetime.utcnow() for all but python 2.7
* Set build package max ver < 1.0 (issue #3112)
KSchopmeyer pushed a commit that referenced this issue Mar 17, 2024
* add new safety fixes to .safety policy and modify
  corresponding versions in requirements.
* New pylint entries to bypass new pylint messages.
* Limit on version of build package. See issue #3112
* Changes to sphinx version limits
* Fixed depencencies for virtualenv and pyinstrument
* Import new versions for pylint and flake8 dependencies
* Changed platformdirs to 2.5.0 on py>=3.7
* Changed tomli to 1.1.0 on py==3.6
* Changed pylint/astroid to 3.0.0 on py>=3.12
* Changed pylint to 3.0.3 and astroid to 3.0.2 on py>=3.12
* Limit version of pytest to < 8.0. Limit pytest version because
  pytest fails many tests with their warnings about
  DepecratedWarnings in pytest version
  8.  See pytest  changelog for more information.
* Modify conftest namedtuple (change exp_result to result)
* Modify cim_type datetime to use datetime.now()
  and remove datetime.utcnow() for all but python 2.7
* Set build package max ver < 1.0 (issue #3112)
andy-maier pushed a commit that referenced this issue Mar 17, 2024
* add new safety fixes to .safety policy and modify
  corresponding versions in requirements.
* New pylint entries to bypass new pylint messages.
* Limit on version of build package. See issue #3112
* Changes to sphinx version limits
* Fixed depencencies for virtualenv and pyinstrument
* Import new versions for pylint and flake8 dependencies
* Changed platformdirs to 2.5.0 on py>=3.7
* Changed tomli to 1.1.0 on py==3.6
* Changed pylint/astroid to 3.0.0 on py>=3.12
* Changed pylint to 3.0.3 and astroid to 3.0.2 on py>=3.12
* Limit version of pytest to < 8.0. Limit pytest version because
  pytest fails many tests with their warnings about
  DepecratedWarnings in pytest version
  8.  See pytest  changelog for more information.
* Modify conftest namedtuple (change exp_result to result)
* Modify cim_type datetime to use datetime.now()
  and remove datetime.utcnow() for all but python 2.7
* Set build package max ver < 1.0 (issue #3112)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants