-
-
Notifications
You must be signed in to change notification settings - Fork 299
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
PEP440 following CI Versions #121
Comments
What platform are you on and what version of pyo3-pack are you using? I've tried to build the get-fourtytwo example with I've uploaded the wheel to TestPyPI (https://test.pypi.org/project/get-fourtytwo/2.1.0-dev2/) and could successfully install it with
PEP 440 also explicitely allows using |
You know what? You're absolutely right. For the record, I am using pyo3-pack 0.6.0-alpha2; as for platform, my build pipelines are for all 3 major OSes, 64 bit only, python 3.6 and python 3.7. I think the reason I ran into problems is I started off by building versions as "1.2.3-SNAPSHOT" -- that's the maven/gradle still lurking in me, I guess. I could publish this easily enough, but I mistakenly presumed that meant that (essex-graphs-rust) dwayne@valinhall:~/source/essex-graphs-rust/packages/pyo3$ cat Cargo.toml
[package]
name = "essex-layouts-pyo3"
version = "1.2.0.dev1234"
authors = ["Dwayne Pryce <[email protected]>"]
edition = "2018"
[lib]
name = "essexlayoutspyo3"
crate-type = ["rlib", "cdylib"]
[dependencies]
pyo3 = ">= 0.6.0-alpha.2, <0.6.0-alpha.3"
essex-graphs-core = { path = "../core" }
chrono = "0.4"
[features]
extension-module = ["pyo3/extension-module"]
default = ["extension-module"]
(essex-graphs-rust) dwayne@valinhall:~/source/essex-graphs-rust/packages/pyo3$ python --version
Python 3.6.7
(essex-graphs-rust) dwayne@valinhall:~/source/essex-graphs-rust/packages/pyo3$ pyo3-pack build --release -i python3.6
Cargo metadata failed: error during execution of `cargo metadata`: error: failed to parse manifest at `/home/dwayne/source/essex-graphs-rust/packages/pyo3/Cargo.toml`
Caused by:
Extra junk after valid version: .dev1234 for key `package.version` Since you said that Anyway, we can close this - I now have a working pre-release version working that makes cargo, pyo3-pack, and pip happy, so that means I'm happy. Well, as happy as one can be before they try to wrangle a bunch of CI build agents into doing what they want, I guess. Thanks! |
Maybe I missed this somewhere, but as far as I can tell pyo3-pack has no support for it:
I'm trying to set up a CI pipeline, both for our in-works stuff with snapshot builds, as well as our release pipeline. Unfortunately, I can't seem to make both
pip
andCargo
happy at the same time.To start with, let's stick with a definition of a CI generated build ID. It'll be in the format of
{YYYY}{MM}{DD}{MonotonicallyIncreasingDailyBuildNumber}
, with the build number being left padded to 3 places, e.g. "20190422003", where today's date is 2019-04-22 and we're on the 3rd build of the day. I'll call this {BuildID} in my examples down below.From what I can tell, Cargo is adamantly opposed to a
{Major}.{Minor}.{Patch}.dev{BuildId}
, which is a fair enough pre-release format that complies with PEP440 and pip's--pre
flag. Example:2.1.3.dev20190422003
Unfortunately, the Cargo way of doing CI builds is very strictly in the form of
{Major}.{Minor}.{Patch}-{SomeAllowableString}{BuildId}
, e.g.2.1.3-dev20190422003
. The hyphen is most important, and it's something Cargo does not seem capable of budging on. And since our version is the came as our version in ourCargo.toml
, our wheel gets generated asmy_artifact_2.1.3-dev20190422003-cp36-cp36m-manylinux1_x86_64.whl
. I can publish this to a snapshot repo, butmy_artifact_2.1.3-dev...
is not going to work with pip's--pre
flag; it just ignores it.If we were in a mono repo this wouldn't even be close to a problem, but we aren't, so it is. It would be great if we could specify some version metadata that would get appended to the version prior to constructing our wheels. I superficially thought I could just rename the wheel and maybe update some metadata in a pinch, but with the sha256 checksums it looked like it wasn't going to be that straight forward.
Is there any way that you can think of to make
pip --pre
happy AND Cargo? If not, can we add a flag that simply appends a "fixed" string to the version that pyo3-pack is going to generate with (fixed in that it wouldn't need to be anything special to pyo3-pack - just a string append operation, but something I can construct in our build pipeline and pass in)?The text was updated successfully, but these errors were encountered: