Skip to content

Commit

Permalink
Changing buil system for parallel pip from source
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Eike S R committed Jun 12, 2024
1 parent 1678f6d commit 786c7b3
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 8 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ jobs:
# use generator from source
export FLATDATA_GENERATOR_PATH=${PWD}/flatdata-generator
cd flatdata-rs
cargo build --all-targets -j 1
cargo build --all-targets --all-features -j 1
cargo build --all-targets
cargo build --all-targets --all-features
- name: Run tests
run: |
# use generator from source
export FLATDATA_GENERATOR_PATH=${PWD}/flatdata-generator
cd flatdata-rs
cargo test --all-targets -j 1
cargo test --all-targets --all-features -j 1
cargo test --all-targets
cargo test --all-targets --all-features
38 changes: 34 additions & 4 deletions flatdata-generator/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,36 @@
[build-system]
requires = [
"setuptools>=42",
"wheel"
requires = ["hatchling"]
build-backend = "hatchling.build"

[project]
name = "flatdata-generator"
version = "0.4.5"
description = "Generate source code for C++, Rust, Go or Python from a Flatdata schema file"
readme = "README.md"
license = ""
authors = [
{ name = "Flatdata Developers" },
]
build-backend = "setuptools.build_meta"
classifiers = [
"License :: OSI Approved :: Apache Software License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
]
dependencies = [
"jinja2>=2.2",
"pyparsing>=2.0",
]

[project.scripts]
flatdata-generator = "flatdata.generator.app:main"

[project.urls]
Homepage = "https://github.com/heremaps/flatdata"

[tool.hatch.build.targets.sdist]
include = [
"/flatdata",
]

[tool.hatch.build.targets.wheel]
packages = ["flatdata"]

0 comments on commit 786c7b3

Please sign in to comment.