Commit graph

13 commits

Author SHA1 Message Date
Alberto Planas
aa8f8a1f10 metadata: support versions like X.*.* 2020-02-18 17:50:26 +01:00
Alberto Planas
fcbf95a78e metadata: replace semantic-version with a custom parser
The library semantic-version changed a lot during the last versions,
making the Metadata class very fragile.

A custom-made semantic version parsed, based on some Cargo specifics,
has been implemented to replace the old parser.

As a result of that, new features were implemented, like the support for
wildcard expressions, as documented in the Cargo book.

Fix: #93
2019-10-28 11:19:46 +01:00
Igor Gnatenko
00c0c5cec9 Add support for prerelease versions
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2019-01-28 09:15:18 +00:00
Igor Gnatenko
2cac5e5ad5
split features into subpackages
References: https://discussion.fedoraproject.org/t/rfc-new-crates-packaging-design-features-have-their-own-subpackages/563?u=ignatenkobrain
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2018-11-03 21:45:04 +01:00
Igor Gnatenko
c9e7cf51e4 optional dependencies are also features
References: https://github.com/rust-lang/cargo/issues/4911
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2018-01-08 14:37:29 +01:00
Igor Gnatenko
600c75796f handle versions like 1.*.*
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2017-07-07 23:46:40 +02:00
Josh Stone
67ca805fda Write pre-release tags with ~ for rpm
We need to translate `x.y.z-foo` to `x.y.z~foo`.  We also need to take
care that pre-release semantic versions are only only allowed to match
the same `x.y.z` series.
2017-07-07 23:46:40 +02:00
Igor Gnatenko
8a9813f3e2 metadata: add support for wildcards in version
Closes: https://pagure.io/fedora-rust/rust2rpm/issue/6
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2017-02-26 17:06:24 +01:00
Igor Gnatenko
f487983d6c use rich dependencies to fullfill requirements
Imagine, that:
* A requires 0.6.0 <= X < 0.7.0
* B requires 0.9.0 <= X < 0.10.0
* C requires A and B

If we use Requires + Conflicts, then we just can't build or install
C, because sub-dependencies are conflicting between each other.

Proper syntax is: (X >= 0.6.0 with X < 0.7.0)

Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2017-02-25 10:02:05 +01:00
Igor Gnatenko
8155c69e38 use python API for tests
Before:
real	0m4.807s
user	0m3.817s
sys	0m0.920s

After:
real	0m1.236s
user	0m1.011s
sys	0m0.222s

Multiply by number of testcases we didn't implement yet and by
python versions we want to test on.

Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2017-02-05 21:06:40 +01:00
Igor Gnatenko
cd9f892d51 rename cargo-deps.py to cargodeps.py
To allow importing from outside. import cargo-deps doesn't really work.

Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2017-01-30 23:21:21 +01:00
Igor Gnatenko
194ee2ce13 add tests for requires and conflicts
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2017-01-30 18:46:58 +01:00
Igor Gnatenko
cdec51f22f add couple of tests for Provides
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2017-01-30 18:46:57 +01:00