[PATCH 1 of 2] rust: published the three extension crates to crates.io

Georges Racinet georges.racinet at octobus.net
Tue Apr 16 19:26:17 UTC 2019


# HG changeset patch
# User Georges Racinet <georges.racinet at octobus.net>
# Date 1555441784 -7200
#      Tue Apr 16 21:09:44 2019 +0200
# Node ID 410396d5eca793a1b8cf9ee8ba7bce466e9be3c0
# Parent  a362b0b95e42c8f7d46d7e3a0eb4cc531fa5f2d6
# EXP-Topic rust-crates.io
rust: published the three extension crates to crates.io

These are the contents of the first publication for
`hg-core`, `hg-cpython` and direct `hg-direct-ffi`, done with
the sarting point '0.0.1' version.
This version has been chosen to be actually lower than the one
declared up to now in the crates manifests.

In the workspace (rust/Cargo.toml), there's an override so that
if building from the whole source, the local hg-core gets selected.

We will have to select a version policy for the upcoming releases,
with the obvious option to have Rust versions equal to the general
Mercurial version, however partial they are.

It should be noted though that the development version must stay
be higher than the latest that be found on crates.io and that satisfies
the rules in Cargo.lock.
(see https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#testing-a-bugfix)

diff -r a362b0b95e42 -r 410396d5eca7 rust/Cargo.lock
--- a/rust/Cargo.lock	Fri Apr 05 14:35:33 2019 +0200
+++ b/rust/Cargo.lock	Tue Apr 16 21:09:44 2019 +0200
@@ -47,7 +47,7 @@
 
 [[package]]
 name = "hg-core"
-version = "0.1.0"
+version = "0.0.1"
 dependencies = [
  "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)",
  "rand_pcg 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -55,10 +55,10 @@
 
 [[package]]
 name = "hg-cpython"
-version = "0.1.0"
+version = "0.0.1"
 dependencies = [
  "cpython 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "hg-core 0.1.0",
+ "hg-core 0.0.1",
  "libc 0.2.45 (registry+https://github.com/rust-lang/crates.io-index)",
  "python27-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "python3-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -68,7 +68,7 @@
 name = "hgdirectffi"
 version = "0.1.0"
 dependencies = [
- "hg-core 0.1.0",
+ "hg-core 0.0.1",
  "libc 0.2.45 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
diff -r a362b0b95e42 -r 410396d5eca7 rust/Cargo.toml
--- a/rust/Cargo.toml	Fri Apr 05 14:35:33 2019 +0200
+++ b/rust/Cargo.toml	Tue Apr 16 21:09:44 2019 +0200
@@ -1,3 +1,6 @@
 [workspace]
 members = ["hg-core", "hg-direct-ffi", "hg-cpython"]
 exclude = ["chg", "hgcli"]
+
+[patch.crates-io]
+hg-core = {path = "hg-core"}
\ No newline at end of file
diff -r a362b0b95e42 -r 410396d5eca7 rust/hg-core/Cargo.toml
--- a/rust/hg-core/Cargo.toml	Fri Apr 05 14:35:33 2019 +0200
+++ b/rust/hg-core/Cargo.toml	Tue Apr 16 21:09:44 2019 +0200
@@ -1,12 +1,15 @@
 [package]
 name = "hg-core"
-version = "0.1.0"
-authors = ["Georges Racinet <gracinet at anybox.fr>"]
+version = "0.0.1"
+authors = ["Georges Racinet <georges.racinett at octobus.net>"]
 description = "Mercurial pure Rust core library, with no assumption on Python bindings (FFI)"
+license = "GPL-2.0-or-later"
+homepage = "https://mercurial-scm.org"
+repository = "https://www.mercurial-scm.org/repo/hg"
 
 [lib]
 name = "hg"
 
 [dev-dependencies]
-rand = "*"
-rand_pcg = "*"
+rand = "~0.6"
+rand_pcg = "~0.1"
diff -r a362b0b95e42 -r 410396d5eca7 rust/hg-cpython/Cargo.toml
--- a/rust/hg-cpython/Cargo.toml	Fri Apr 05 14:35:33 2019 +0200
+++ b/rust/hg-cpython/Cargo.toml	Tue Apr 16 21:09:44 2019 +0200
@@ -1,7 +1,11 @@
 [package]
 name = "hg-cpython"
-version = "0.1.0"
-authors = ["Georges Racinet <gracinet at anybox.fr>"]
+version = "0.0.1"
+authors = ["Georges Racinet <georges.racinett at octobus.net>"]
+description = "Mercurial Python bindings using the cpython crate"
+license = "GPL-2.0-or-later"
+homepage = "https://mercurial-scm.org"
+repository = "https://www.mercurial-scm.org/repo/hg"
 
 [lib]
 name='rusthg'
@@ -18,17 +22,17 @@
 python3 = ["python3-sys", "cpython/python3-sys", "cpython/extension-module"]
 
 [dependencies]
-hg-core = { path = "../hg-core" }
-libc = '*'
+hg-core = "0.0.1"
+libc = "^0.2"
 
 [dependencies.cpython]
-version = "*"
+version = "~0.2.1"
 default-features = false
 
 [dependencies.python27-sys]
-version = "0.2.1"
+version = "~0.2.1"
 optional = true
 
 [dependencies.python3-sys]
-version = "0.2.1"
+version = "~0.2.1"
 optional = true
diff -r a362b0b95e42 -r 410396d5eca7 rust/hg-direct-ffi/Cargo.toml
--- a/rust/hg-direct-ffi/Cargo.toml	Fri Apr 05 14:35:33 2019 +0200
+++ b/rust/hg-direct-ffi/Cargo.toml	Tue Apr 16 21:09:44 2019 +0200
@@ -2,11 +2,14 @@
 name = "hgdirectffi"
 version = "0.1.0"
 authors = ["Georges Racinet <gracinet at anybox.fr>"]
-description = "Low level Python bindings for hg-core, going through existing C extensions"
+description = "Mercurial low level Python bindings, going through existing C extensions"
+license = "GPL-2.0-or-later"
+homepage = "https://mercurial-scm.org"
+repository = "https://www.mercurial-scm.org/repo/hg"
 
 [dependencies]
-libc = "*"
-hg-core = { path = "../hg-core" }
+libc = "^0.2"
+hg-core = "0.0.1"
 
 [lib]
 crate-type = ["staticlib"]


More information about the Mercurial-devel mailing list