mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-16 00:30:06 +02:00
importlib_metadata: hopefully fix the build for good this time. (#9338)
The presence of HaikuPorter's work git repo interferes with the operation of some python packages used at build time, causing builds with "hp -G" to succeed, but fail without that flag, unless these work-arounds are applied: - exporting a `SETUPTOOLS_SCM_PRETEND_VERSION` variable - `rm -rf dist`
This commit is contained in:
@@ -51,11 +51,21 @@ done
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
# Needed due to the presence of HaikuPorter's work .git dir:
|
||||
# setuptools_scm assumes that .git is from the project, and fails to get the info it needs
|
||||
# generating wrong default value in that case.
|
||||
export SETUPTOOLS_SCM_PRETEND_VERSION=$portVersion
|
||||
|
||||
for i in "${!PYTHON_PACKAGES[@]}"; do
|
||||
pythonPackage=${PYTHON_PACKAGES[i]}
|
||||
|
||||
python=python${PYTHON_VERSIONS[$i]}
|
||||
|
||||
# Needed to build without -G in the haikuporter build call.
|
||||
# the presence of HaikuPorter's working .git dir seems to confuse
|
||||
# some python's builds/packages.
|
||||
rm -rf dist
|
||||
|
||||
$python -m build --wheel --skip-dependency-check --no-isolation
|
||||
$python -m installer -p $prefix dist/*.whl
|
||||
|
||||
|
||||
Reference in New Issue
Block a user