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 generator to work with python 3.12 #242

Merged
merged 5 commits into from
Jun 14, 2024
Merged

Conversation

eikesr
Copy link
Collaborator

@eikesr eikesr commented Apr 24, 2024

imp has been removed in python 3.12. I switched to the replacement suggested in the release notes. See: https://docs.python.org/3.12/whatsnew/3.12.html#imp

While I did not test previous python versions, the replacement function types.ModuleType is available since at least python 3.4.

Please have a look

`imp` has been removed in python 3.12. I switched to the replacement suggested in the release notes. See: https://docs.python.org/3.12/whatsnew/3.12.html#imp

While I did not test previous python versions, the replacement function `types.ModuleType` is available since at least python 3.4

Signed-off-by: Eike S R <eike.roehrs@gmail.com>
Signed-off-by: Eike S R <eike.roehrs@gmail.com>
`flatdata::generate` (see: `lib/src/generator.rs`) uses `pip` to install
the flatdata generator. Concurrent calls to build it from source cause
it to fail.

Signed-off-by: Eike S R <eike.roehrs@gmail.com>
@eikesr
Copy link
Collaborator Author

eikesr commented Apr 29, 2024

Confirmed the pip parallel local build issue: pypa/pip#8168

@eikesr eikesr requested a review from VeaaC April 29, 2024 09:18
@boxdot boxdot self-requested a review June 13, 2024 07:58
Eike S R added 2 commits June 14, 2024 12:15
Changing the build system backend for the flatdata-generator to
hatchling seems to allow parallel builds from source again. See:
https://pip.pypa.io/en/stable/topics/local-project-installs/#build-artifacts
on why it doesn't work with setuptools.

TODO: Still needs some cleanup before being ready

Signed-off-by: Eike S R <eike.roehrs@gmail.com>
Signed-off-by: Eike S R <eike.roehrs@gmail.com>
@eikesr
Copy link
Collaborator Author

eikesr commented Jun 14, 2024

Now worked around the new setuptools+pip limitation (https://pip.pypa.io/en/stable/topics/local-project-installs/#build-artifacts) by switching to hatchling. Verified that the generated package is good (all files are present, seems to be usable).

One of you needs to upload the new version, once this is in

@eikesr eikesr force-pushed the master branch 2 times, most recently from 95bd3a6 to 7d80162 Compare June 14, 2024 11:53
@eikesr
Copy link
Collaborator Author

eikesr commented Jun 14, 2024

As for the other python package(s?) under flatdata-py. They are not affected, because they pull in flatdata-generator with pip and as such the build backend used for it doesn't matter.

I will, however, file a follow-up MR for upgrading the generator version used in the other packages. And maybe in that one change the build backend for them to hatchling, too, so that it is not a wild mix

@eikesr eikesr requested a review from boxdot June 14, 2024 11:58
Copy link
Collaborator

@VeaaC VeaaC left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGT

flatdata-generator/pyproject.toml Show resolved Hide resolved
@eikesr eikesr merged commit ce73c93 into heremaps:master Jun 14, 2024
17 checks passed
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 this pull request may close these issues.

3 participants