mirror of
https://github.com/facebook/sapling.git
synced 2024-12-27 06:52:23 +03:00
rust-cpython: allow compilation for both py2 and py3
Summary: Set up the `cpython-ext` and `hgcommands` libraries so that they can compile against py2 and py3 versions of rust-cpython. Make py2 the default so that cargo test still works. Reviewed By: singhsrb Differential Revision: D19615656 fbshipit-source-id: 3403e7077deb3c0a9dfe0e3b7d4f4ad1da73bba3
This commit is contained in:
parent
9f2330a832
commit
1e63f205f4
@ -5,5 +5,5 @@ edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
blackbox = { path = "../../../../lib/blackbox" }
|
||||
cpython-ext = { path = "../../../../lib/cpython-ext" }
|
||||
cpython-ext = { path = "../../../../lib/cpython-ext", default-features = false }
|
||||
cpython = { version = "0.4", default-features = false }
|
||||
|
@ -6,5 +6,5 @@ edition = "2018"
|
||||
[dependencies]
|
||||
bookmarkstore = { path = "../../../../lib/bookmarkstore" }
|
||||
cpython = { version = "0.4", default-features = false }
|
||||
cpython-ext = { path = "../../../../lib/cpython-ext" }
|
||||
cpython-ext = { path = "../../../../lib/cpython-ext", default-features = false }
|
||||
types = { path = "../../../../lib/types" }
|
||||
|
@ -6,6 +6,6 @@ edition = "2018"
|
||||
[dependencies]
|
||||
clidispatch = { path = "../../../../lib/clidispatch" }
|
||||
cliparser = { path = "../../../../lib/cliparser", features = ["python"] }
|
||||
cpython-ext = { path = "../../../../lib/cpython-ext" }
|
||||
cpython-ext = { path = "../../../../lib/cpython-ext", default-features = false }
|
||||
cpython = { version = "0.4", default-features = false }
|
||||
pyconfigparser = { path = "../pyconfigparser" }
|
||||
|
@ -5,6 +5,6 @@ edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
clidispatch = { path = "../../../../lib/clidispatch" }
|
||||
cpython-ext = { path = "../../../../lib/cpython-ext" }
|
||||
cpython-ext = { path = "../../../../lib/cpython-ext", default-features = false }
|
||||
cpython = { version = "0.4", default-features = false }
|
||||
hgcommands = { path = "../../../../lib/hgcommands" }
|
||||
|
@ -7,5 +7,5 @@ edition = "2018"
|
||||
bytes = "0.4.11"
|
||||
configparser = { path = "../../../../lib/configparser" }
|
||||
cpython = { version = "0.4", default-features = false }
|
||||
cpython-ext = { path = "../../../../lib/cpython-ext" }
|
||||
cpython-ext = { path = "../../../../lib/cpython-ext", default-features = false }
|
||||
util = { path = "../../../../lib/util" }
|
||||
|
@ -4,7 +4,7 @@ version = "0.1.0"
|
||||
edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
cpython-ext = { path = "../../../../lib/cpython-ext" }
|
||||
cpython-ext = { path = "../../../../lib/cpython-ext", default-features = false }
|
||||
cpython = { version = "0.4", default-features = false }
|
||||
dag = { path = "../../../../lib/dag" }
|
||||
anyhow = "1.0.20"
|
||||
|
@ -5,7 +5,7 @@ edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
bytes = "0.4"
|
||||
cpython-ext = { path = "../../../../lib/cpython-ext" }
|
||||
cpython-ext = { path = "../../../../lib/cpython-ext", default-features = false }
|
||||
cpython = { version = "0.4", default-features = false }
|
||||
edenapi = { path = "../../../../lib/edenapi" }
|
||||
pyrevisionstore = { path = "../pyrevisionstore" }
|
||||
|
@ -5,7 +5,7 @@ edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
cpython = { version = "0.4", default-features = false }
|
||||
cpython-ext = { path = "../../../../lib/cpython-ext" }
|
||||
cpython-ext = { path = "../../../../lib/cpython-ext", default-features = false }
|
||||
indexedlog = { path = "../../../../lib/indexedlog" }
|
||||
metalog = { path = "../../../../lib/metalog" }
|
||||
revisionstore = { path = "../../../../lib/revisionstore" }
|
||||
|
@ -5,5 +5,5 @@ edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
cpython = { version = "0.4", default-features = false }
|
||||
cpython-ext = { path = "../../../../lib/cpython-ext" }
|
||||
cpython-ext = { path = "../../../../lib/cpython-ext", default-features = false }
|
||||
hgtime = { path = "../../../../lib/hgtime" }
|
||||
|
@ -9,7 +9,7 @@ python2 = []
|
||||
python3 = []
|
||||
|
||||
[dependencies]
|
||||
cpython-ext = { path = "../../../../lib/cpython-ext" }
|
||||
cpython-ext = { path = "../../../../lib/cpython-ext", default-features = false }
|
||||
radixbuf = { path = "../../../../lib/radixbuf" }
|
||||
anyhow = "1.0.20"
|
||||
thiserror = "1.0.5"
|
||||
|
@ -4,6 +4,6 @@ version = "0.1.0"
|
||||
edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
cpython-ext = { path = "../../../../lib/cpython-ext" }
|
||||
cpython-ext = { path = "../../../../lib/cpython-ext", default-features = false }
|
||||
cpython = { version = "0.4", default-features = false }
|
||||
lz4-pyframe = { path = "../../../../lib/lz4-pyframe" }
|
||||
|
@ -6,7 +6,7 @@ edition = "2018"
|
||||
[dependencies]
|
||||
anyhow = "1.0.20"
|
||||
bytes = { version = "0.4.11" }
|
||||
cpython-ext = { path = "../../../../lib/cpython-ext" }
|
||||
cpython-ext = { path = "../../../../lib/cpython-ext", default-features = false }
|
||||
cpython = { version = "0.4", default-features = false }
|
||||
manifest = { path = "../../../../lib/manifest" }
|
||||
manifest-tree = { path = "../../../../lib/manifest-tree" }
|
||||
|
@ -5,5 +5,5 @@ edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
cpython = { version = "0.4", default-features = false }
|
||||
cpython-ext = { path = "../../../../lib/cpython-ext" }
|
||||
cpython-ext = { path = "../../../../lib/cpython-ext", default-features = false }
|
||||
metalog = { path = "../../../../lib/metalog" }
|
||||
|
@ -6,7 +6,7 @@ edition = "2018"
|
||||
[dependencies]
|
||||
anyhow = "1.0.20"
|
||||
byteorder = "1.2.7"
|
||||
cpython-ext = { path = "../../../../lib/cpython-ext" }
|
||||
cpython-ext = { path = "../../../../lib/cpython-ext", default-features = false }
|
||||
cpython = { version = "0.4", default-features = false }
|
||||
mutationstore = { path = "../../../../lib/mutationstore" }
|
||||
thiserror = "1.0.5"
|
||||
|
@ -5,6 +5,6 @@ edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
cpython = { version = "0.4", default-features = false }
|
||||
cpython-ext = { path = "../../../../lib/cpython-ext" }
|
||||
cpython-ext = { path = "../../../../lib/cpython-ext", default-features = false }
|
||||
nodemap = { path = "../../../../lib/nodemap" }
|
||||
types = { path = "../../../../lib/types" }
|
||||
|
@ -4,7 +4,7 @@ version = "0.1.0"
|
||||
edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
cpython-ext = { path = "../../../../lib/cpython-ext" }
|
||||
cpython-ext = { path = "../../../../lib/cpython-ext", default-features = false }
|
||||
cpython = { version = "0.4", default-features = false }
|
||||
pathmatcher = { path = "../../../../lib/pathmatcher" }
|
||||
types = { path = "../../../../lib/types" }
|
||||
|
@ -5,7 +5,7 @@ edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
anyhow = "1.0.20"
|
||||
cpython-ext = { path = "../../../../lib/cpython-ext" }
|
||||
cpython-ext = { path = "../../../../lib/cpython-ext", default-features = false }
|
||||
cpython = { version = "0.4", default-features = false }
|
||||
parking_lot = "0.9.0"
|
||||
pyconfigparser = { path = "../pyconfigparser" }
|
||||
|
@ -5,6 +5,6 @@ edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
cpython = { version = "0.4", default-features = false }
|
||||
cpython-ext = { path = "../../../../lib/cpython-ext" }
|
||||
cpython-ext = { path = "../../../../lib/cpython-ext", default-features = false }
|
||||
dag = { path = "../../../../lib/dag" }
|
||||
pydag = { path = "../pydag" }
|
||||
|
@ -9,7 +9,7 @@ python2 = ["python27-sys"]
|
||||
python3 = ["python3-sys"]
|
||||
|
||||
[dependencies]
|
||||
cpython-ext = { path = "../../../../lib/cpython-ext" }
|
||||
cpython-ext = { path = "../../../../lib/cpython-ext", default-features = false }
|
||||
cpython = { version = "0.4", default-features = false }
|
||||
lazy_static = "1"
|
||||
mincode = { path = "../../../../lib/mincode" }
|
||||
|
@ -5,6 +5,6 @@ edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
anyhow = "1.0.20"
|
||||
cpython-ext = { path = "../../../../lib/cpython-ext" }
|
||||
cpython-ext = { path = "../../../../lib/cpython-ext", default-features = false }
|
||||
cpython = { version = "0.4", default-features = false }
|
||||
treestate = { path = "../../../../lib/treestate" }
|
||||
|
@ -5,5 +5,5 @@ edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
cpython = { version = "0.4", default-features = false }
|
||||
cpython-ext = { path = "../../../../lib/cpython-ext" }
|
||||
cpython-ext = { path = "../../../../lib/cpython-ext", default-features = false }
|
||||
vlqencoding = { path = "../../../../lib/vlqencoding" }
|
||||
|
@ -6,7 +6,7 @@ edition = "2018"
|
||||
[dependencies]
|
||||
anyhow = "1.0.20"
|
||||
cpython = { version = "0.4", default-features = false }
|
||||
cpython-ext = { path = "../../../../lib/cpython-ext" }
|
||||
cpython-ext = { path = "../../../../lib/cpython-ext", default-features = false }
|
||||
pathmatcher = { path = "../../../../lib/pathmatcher" }
|
||||
pypathmatcher = { path = "../pypathmatcher" }
|
||||
types = { path = "../../../../lib/types" }
|
||||
|
@ -4,7 +4,7 @@ version = "0.1.0"
|
||||
edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
cpython-ext = { path = "../../../../lib/cpython-ext" }
|
||||
cpython-ext = { path = "../../../../lib/cpython-ext", default-features = false }
|
||||
cpython = { version = "0.4", default-features = false }
|
||||
zstd = "0.4.18"
|
||||
zstdelta = { path = "../../../../lib/zstdelta/" }
|
||||
|
@ -5,5 +5,5 @@ edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
cpython = { version = "0.4", default-features = false }
|
||||
cpython-ext = { path = "../../../../lib/cpython-ext" }
|
||||
cpython-ext = { path = "../../../../lib/cpython-ext", default-features = false }
|
||||
zstore = { path = "../../../../lib/zstore" }
|
||||
|
@ -4,9 +4,9 @@ version = "0.1.0"
|
||||
edition = "2018"
|
||||
|
||||
[features]
|
||||
default = []
|
||||
python2 = ["python27-sys"]
|
||||
python3 = ["python3-sys"]
|
||||
default = ["python2"]
|
||||
python2 = ["python27-sys", "cpython/python27-sys"]
|
||||
python3 = ["python3-sys", "cpython/python3-sys"]
|
||||
|
||||
[dependencies]
|
||||
anyhow = "1.0.20"
|
||||
|
@ -4,7 +4,7 @@ version = "0.1.0"
|
||||
edition = "2018"
|
||||
|
||||
[features]
|
||||
default = []
|
||||
default = ["python2"]
|
||||
python2 = ["bindings/python2", "pytracing/python2", "python27-sys", "cpython-ext/python2", "cpython/python27-sys"]
|
||||
python3 = ["bindings/python3", "pytracing/python3", "python3-sys", "cpython-ext/python3", "cpython/python3-sys"]
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user