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

update setup.py #113

Merged
merged 1 commit into from
Jul 3, 2024
Merged

update setup.py #113

merged 1 commit into from
Jul 3, 2024

Conversation

olebedev
Copy link
Contributor

@olebedev olebedev commented Jul 3, 2024

Hi there 👋,

I tried to use the package and encountered issues with the published wheels.

% python_platform="x86_64-manylinux_2_28"
% requirements_os=linux
% python3.10 -m uv pip install \
    --no-deps \
    --python-version "3.10" \
    --python-platform ${python_platform} \
    --requirement "tools/build/python/third_party/requirements.${requirements_os}.txt"
...
[notice] A new release of pip is available: 24.0 -> 24.1.1
[notice] To update, run: pip install --upgrade pip
Resolved 565 packages in 187ms
error: Failed to download distributions
  Caused by: Failed to fetch wheel: stpyv8==12.6.228.19
  Caused by: Failed to build: `stpyv8==12.6.228.19`
  Caused by: Build backend failed to determine extra requires with `build_wheel()` with exit status: 1
--- stdout:

--- stderr:
Traceback (most recent call last):
  File "<string>", line 14, in <module>
  File "/home/coder/.cache/uv/.tmptZbEGo/.venv/lib/python3.10/site-packages/setuptools/build_meta.py", line 327, in get_requires_for_build_wheel
    return self._get_build_requires(config_settings, requirements=[])
  File "/home/coder/.cache/uv/.tmptZbEGo/.venv/lib/python3.10/site-packages/setuptools/build_meta.py", line 297, in _get_build_requires
    self.run_setup()
  File "/home/coder/.cache/uv/.tmptZbEGo/.venv/lib/python3.10/site-packages/setuptools/build_meta.py", line 497, in run_setup
    super().run_setup(setup_script=setup_script)
  File "/home/coder/.cache/uv/.tmptZbEGo/.venv/lib/python3.10/site-packages/setuptools/build_meta.py", line 313, in run_setup
    exec(code, locals())
  File "<string>", line 10, in <module>
ModuleNotFoundError: No module named 'wheel'

I turned out that the metadata is inaccurate which led to the wheel's lookup miss. And later, for the fallback of building the package it relies on the wheel package which cannot be found during the build process due to it's not listed in the setup_requires argument.

In this PR I suggest the change that fixes both issue. Please let me know what are your thoughts. I am open for discussion around find the best approach to address the issue.

Kind regards,
Oleg

@buffer buffer self-assigned this Jul 3, 2024
@buffer buffer added the enhancement New feature or request label Jul 3, 2024
@buffer buffer merged commit 37ae2c5 into cloudflare:master Jul 3, 2024
24 checks passed
@buffer
Copy link
Collaborator

buffer commented Jul 3, 2024

PR merged. Thank you!

@olebedev
Copy link
Contributor Author

olebedev commented Jul 3, 2024

Great, thank you @buffer for your swift response!

Can you guide me through the project's release process? I'm interested in understanding how to make it available on PyPI.

@buffer
Copy link
Collaborator

buffer commented Jul 7, 2024

The release process is extremely simple and relies on Github Actions.

The YAML files in the folder .github/workflows take care of building STPyV8 every time a patch is committed and run tests once done to spot issues and regressions. This process is performed on all the supported platforms. Moreover every time a specific version of Google V8 is built on a specific platform the V8 binary is cached so that it is not built again and again thus saving time.

The release process to PyPI is fired just when I manually create a new Github release. This is done intentionally and allows me to have full control of the release process as there could be situations where I want to create a git tag but not to release STPyV8 to PyPI

@olebedev olebedev deleted the oleg/update-setup-py branch July 14, 2024 22:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants