[gnome-build-meta/abderrahim/pip: 1/2] use pip plugin instead of distutils
- From: Abderrahim Kitouni <akitouni src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-build-meta/abderrahim/pip: 1/2] use pip plugin instead of distutils
- Date: Thu, 13 Jan 2022 14:24:55 +0000 (UTC)
commit 8e98c74c11e1f618be685f84afe011dbe0a54298
Author: Abderrahim Kitouni <akitouni gnome org>
Date: Thu Jan 6 18:22:28 2022 +0100
use pip plugin instead of distutils
elements/core-deps/pycups.bst | 9 ++++----
elements/core-deps/python-pyparsing.bst | 4 ++--
elements/sdk-deps/python-smartypants.bst | 3 ---
elements/sdk-deps/python-typogrify.bst | 14 ++++++------
elements/vm/buildstream/arpy.bst | 4 ++--
elements/vm/buildstream/breezy.bst | 11 +++++-----
elements/vm/buildstream/bst-external.bst | 8 +++----
elements/vm/buildstream/buildstream.bst | 27 +++++++++++++-----------
elements/vm/buildstream/click.bst | 4 ++--
elements/vm/buildstream/grpcio.bst | 16 ++++++--------
elements/vm/buildstream/pluginbase.bst | 13 +++++++-----
elements/vm/buildstream/psutil.bst | 12 +++++------
elements/vm/buildstream/pytest-runner.bst | 5 +++--
elements/vm/buildstream/python3-configobj.bst | 5 +++--
elements/vm/buildstream/python3-dulwich.bst | 8 +++----
elements/vm/buildstream/python3-fastimport.bst | 4 ++--
elements/vm/buildstream/python3-markupsafe.bst | 12 -----------
elements/vm/buildstream/python3-patiencediff.bst | 11 ++++++++++
elements/vm/buildstream/ruamel-yaml-clib.bst | 3 ---
elements/vm/buildstream/ruamel-yaml.bst | 7 +-----
elements/vm/buildstream/ujson.bst | 4 +++-
project.conf | 22 ++++++++-----------
22 files changed, 98 insertions(+), 108 deletions(-)
---
diff --git a/elements/core-deps/pycups.bst b/elements/core-deps/pycups.bst
index 18e46024a..90cfe7738 100644
--- a/elements/core-deps/pycups.bst
+++ b/elements/core-deps/pycups.bst
@@ -1,11 +1,12 @@
-kind: distutils
+kind: pip
+
sources:
- kind: tar
url: github_files:OpenPrinting/pycups/releases/download/v2.0.1/pycups-2.0.1.tar.gz
+build-depends:
+- freedesktop-sdk.bst:components/python3-pip.bst
+
depends:
- freedesktop-sdk.bst:components/cups.bst
- freedesktop-sdk.bst:components/python3.bst
-
-variables:
- python: python3
diff --git a/elements/core-deps/python-pyparsing.bst b/elements/core-deps/python-pyparsing.bst
index 59695b6a6..a993dc6ec 100644
--- a/elements/core-deps/python-pyparsing.bst
+++ b/elements/core-deps/python-pyparsing.bst
@@ -1,11 +1,11 @@
-kind: distutils
+kind: pip
sources:
- kind: tar
url:
pythonhosted:packages/c1/47/dfc9c342c9842bbe0036c7f763d2d6686bcf5eb1808ba3e170afdb282210/pyparsing-2.4.7.tar.gz
build-depends:
-- freedesktop-sdk.bst:components/python3-setuptools.bst
+- freedesktop-sdk.bst:components/python3-pip.bst
depends:
- freedesktop-sdk.bst:components/python3.bst
diff --git a/elements/sdk-deps/python-smartypants.bst b/elements/sdk-deps/python-smartypants.bst
index d90ad292d..b7818a00f 100644
--- a/elements/sdk-deps/python-smartypants.bst
+++ b/elements/sdk-deps/python-smartypants.bst
@@ -9,6 +9,3 @@ build-depends:
depends:
- freedesktop-sdk.bst:components/python3.bst
-
-variables:
- pip: pip3
diff --git a/elements/sdk-deps/python-typogrify.bst b/elements/sdk-deps/python-typogrify.bst
index 44fe2498f..8a8059c1a 100644
--- a/elements/sdk-deps/python-typogrify.bst
+++ b/elements/sdk-deps/python-typogrify.bst
@@ -1,12 +1,12 @@
-kind: distutils
+kind: pip
-depends:
-- freedesktop-sdk.bst:components/python3.bst
-- sdk-deps/python-smartypants.bst
+sources:
+- kind: tar
+ url:
pythonhosted:packages/8a/bf/64959d6187d42472acb846bcf462347c9124952c05bd57e5769d5f28f9a6/typogrify-2.0.7.tar.gz
build-depends:
- freedesktop-sdk.bst:components/python3-pip.bst
-sources:
-- kind: tar
- url:
pythonhosted:packages/8a/bf/64959d6187d42472acb846bcf462347c9124952c05bd57e5769d5f28f9a6/typogrify-2.0.7.tar.gz
+depends:
+- sdk-deps/python-smartypants.bst
+- freedesktop-sdk.bst:components/python3.bst
diff --git a/elements/vm/buildstream/arpy.bst b/elements/vm/buildstream/arpy.bst
index 1ceb18525..cbf514c48 100644
--- a/elements/vm/buildstream/arpy.bst
+++ b/elements/vm/buildstream/arpy.bst
@@ -1,11 +1,11 @@
-kind: distutils
+kind: pip
sources:
- kind: tar
url:
pythonhosted:packages/b4/2d/9a1fb66d3632a4646f52cf4d75cda1f14bf6fb74f1bf322236de347523e8/arpy-2.2.0.tar.gz
build-depends:
-- freedesktop-sdk.bst:components/python3-setuptools.bst
+- freedesktop-sdk.bst:components/python3-pip.bst
depends:
- freedesktop-sdk.bst:components/python3.bst
diff --git a/elements/vm/buildstream/breezy.bst b/elements/vm/buildstream/breezy.bst
index a1f182272..4a89b5cd1 100644
--- a/elements/vm/buildstream/breezy.bst
+++ b/elements/vm/buildstream/breezy.bst
@@ -1,20 +1,19 @@
-kind: distutils
+kind: pip
sources:
- kind: tar
url: launchpad:brz/3.1/3.1.0/+download/breezy-3.1.0.tar.gz
build-depends:
-- freedesktop-sdk.bst:components/python3-setuptools.bst
+- freedesktop-sdk.bst:components/python3-pip.bst
depends:
-- freedesktop-sdk.bst:components/python3.bst
-- freedesktop-sdk.bst:components/python3-six.bst
- vm/buildstream/python3-configobj.bst
-
-runtime-depends:
- vm/buildstream/python3-dulwich.bst
- vm/buildstream/python3-fastimport.bst
+- vm/buildstream/python3-patiencediff.bst
+- freedesktop-sdk.bst:components/python3-six.bst
+- freedesktop-sdk.bst:components/python3.bst
config:
install-commands:
diff --git a/elements/vm/buildstream/bst-external.bst b/elements/vm/buildstream/bst-external.bst
index fddb83ad7..9ebe2e1cb 100644
--- a/elements/vm/buildstream/bst-external.bst
+++ b/elements/vm/buildstream/bst-external.bst
@@ -1,4 +1,4 @@
-kind: distutils
+kind: pip
sources:
- kind: git_tag
@@ -6,11 +6,11 @@ sources:
track: 0.25.0
build-depends:
+- freedesktop-sdk.bst:components/python3-pip.bst
- freedesktop-sdk.bst:components/python3-setuptools-scm.bst
depends:
-- freedesktop-sdk.bst:components/python3-setuptools.bst
- vm/buildstream/buildstream.bst
-
-runtime-depends:
+- freedesktop-sdk.bst:components/python3-requests.bst
+- freedesktop-sdk.bst:components/python3-setuptools.bst
- freedesktop-sdk.bst:components/python3-toml.bst
diff --git a/elements/vm/buildstream/buildstream.bst b/elements/vm/buildstream/buildstream.bst
index 4cf8ae817..0db79521d 100644
--- a/elements/vm/buildstream/buildstream.bst
+++ b/elements/vm/buildstream/buildstream.bst
@@ -1,29 +1,32 @@
-kind: distutils
+kind: pip
sources:
- kind: tar
url: github_files:apache/buildstream/archive/refs/tags/1.6.3.tar.gz
+build-depends:
+- freedesktop-sdk.bst:components/python3-pip.bst
+
depends:
- sdk-deps/bubblewrap.bst
-- vm/buildstream/pytest-runner.bst
-- freedesktop-sdk.bst:components/python3.bst
-- freedesktop-sdk.bst:components/python3-setuptools.bst
-
-runtime-depends:
-- sdk/pygobject.bst
-- core-deps/libostree.bst
-- vm/buildstream/arpy.bst
- vm/buildstream/click.bst
- vm/buildstream/grpcio.bst
- vm/buildstream/pluginbase.bst
- vm/buildstream/psutil.bst
+- vm/buildstream/pytest-runner.bst
- vm/buildstream/ruamel-yaml.bst
- vm/buildstream/ujson.bst
-- vm/buildstream/breezy.bst
- freedesktop-sdk.bst:components/python3-jinja2.bst
+- freedesktop-sdk.bst:components/python3-setuptools.bst
+- freedesktop-sdk.bst:components/python3.bst
+
+runtime-depends:
+- core-deps/libostree.bst
+- sdk/pygobject.bst
+- vm/buildstream/arpy.bst
+- vm/buildstream/breezy.bst
- freedesktop-sdk.bst:components/ca-certificates.bst
+- freedesktop-sdk.bst:components/fuse.bst
- freedesktop-sdk.bst:components/git.bst
-- freedesktop-sdk.bst:components/patch.bst
- freedesktop-sdk.bst:components/lzip.bst
-- freedesktop-sdk.bst:components/fuse.bst
+- freedesktop-sdk.bst:components/patch.bst
diff --git a/elements/vm/buildstream/click.bst b/elements/vm/buildstream/click.bst
index e4805e891..092fa96cc 100644
--- a/elements/vm/buildstream/click.bst
+++ b/elements/vm/buildstream/click.bst
@@ -1,11 +1,11 @@
-kind: distutils
+kind: pip
sources:
- kind: tar
url:
pythonhosted:packages/27/6f/be940c8b1f1d69daceeb0032fee6c34d7bd70e3e649ccac0951500b4720e/click-7.1.2.tar.gz
build-depends:
-- freedesktop-sdk.bst:components/python3-setuptools.bst
+- freedesktop-sdk.bst:components/python3-pip.bst
depends:
- freedesktop-sdk.bst:components/python3.bst
diff --git a/elements/vm/buildstream/grpcio.bst b/elements/vm/buildstream/grpcio.bst
index 33f855a4c..3e86b62c9 100644
--- a/elements/vm/buildstream/grpcio.bst
+++ b/elements/vm/buildstream/grpcio.bst
@@ -1,20 +1,18 @@
-kind: distutils
+kind: pip
sources:
- kind: tar
url:
pythonhosted:packages/a0/d6/d04c6550debe23e2eaef0d9c4adccbb6e20d8cce6da40ae989fe8836e287/grpcio-1.37.1.tar.gz
-depends:
-- freedesktop-sdk.bst:components/python3.bst
-
build-depends:
- freedesktop-sdk.bst:components/cython.bst
-- freedesktop-sdk.bst:components/python3-setuptools.bst
+- freedesktop-sdk.bst:components/python3-pip.bst
-runtime-depends:
-- freedesktop-sdk.bst:components/python3-six.bst
+depends:
- core-deps/protobuf.bst
+- freedesktop-sdk.bst:components/python3-six.bst
+- freedesktop-sdk.bst:components/python3.bst
environment:
- GRPC_PYTHON_BUILD_SYSTEM_OPENSSL: "true"
- GRPC_PYTHON_BUILD_WITH_CYTHON: "1"
+ GRPC_PYTHON_BUILD_SYSTEM_OPENSSL: 'true'
+ GRPC_PYTHON_BUILD_WITH_CYTHON: '1'
diff --git a/elements/vm/buildstream/pluginbase.bst b/elements/vm/buildstream/pluginbase.bst
index 410e7defa..edbfac36d 100644
--- a/elements/vm/buildstream/pluginbase.bst
+++ b/elements/vm/buildstream/pluginbase.bst
@@ -1,9 +1,12 @@
-kind: distutils
-
-depends:
-- freedesktop-sdk.bst:components/python3.bst
-- freedesktop-sdk.bst:components/python3-setuptools.bst
+kind: pip
sources:
- kind: tar
url:
pythonhosted:packages/3d/3c/fe974b4f835f83cc46966e04051f8708b7535bac28fbc0dcca1ee0c237b8/pluginbase-1.0.0.tar.gz
+
+build-depends:
+- freedesktop-sdk.bst:components/python3-pip.bst
+
+depends:
+- freedesktop-sdk.bst:components/python3-setuptools.bst
+- freedesktop-sdk.bst:components/python3.bst
diff --git a/elements/vm/buildstream/psutil.bst b/elements/vm/buildstream/psutil.bst
index 78a155336..4b5b5ee87 100644
--- a/elements/vm/buildstream/psutil.bst
+++ b/elements/vm/buildstream/psutil.bst
@@ -1,11 +1,11 @@
-kind: distutils
+kind: pip
+
+sources:
+- kind: tar
+ url:
pythonhosted:packages/e1/b0/7276de53321c12981717490516b7e612364f2cb372ee8901bd4a66a000d7/psutil-5.8.0.tar.gz
build-depends:
-- freedesktop-sdk.bst:components/python3-setuptools.bst
+- freedesktop-sdk.bst:components/python3-pip.bst
depends:
- freedesktop-sdk.bst:components/python3.bst
-
-sources:
-- kind: tar
- url:
pythonhosted:packages/e1/b0/7276de53321c12981717490516b7e612364f2cb372ee8901bd4a66a000d7/psutil-5.8.0.tar.gz
diff --git a/elements/vm/buildstream/pytest-runner.bst b/elements/vm/buildstream/pytest-runner.bst
index 496dd91d2..559da4f46 100644
--- a/elements/vm/buildstream/pytest-runner.bst
+++ b/elements/vm/buildstream/pytest-runner.bst
@@ -1,12 +1,13 @@
-kind: distutils
+kind: pip
sources:
- kind: tar
url:
pythonhosted:packages/62/6d/681466a726a851faf4a175d0d73675cc19470a31be414e7f46fc776027e5/pytest-runner-5.3.0.tar.gz
build-depends:
-- freedesktop-sdk.bst:components/python3-wheel.bst
+- freedesktop-sdk.bst:components/python3-pip.bst
- freedesktop-sdk.bst:components/python3-setuptools-scm.bst
+- freedesktop-sdk.bst:components/python3-wheel.bst
depends:
- freedesktop-sdk.bst:components/python3.bst
diff --git a/elements/vm/buildstream/python3-configobj.bst b/elements/vm/buildstream/python3-configobj.bst
index e0019d095..d8b8a054a 100644
--- a/elements/vm/buildstream/python3-configobj.bst
+++ b/elements/vm/buildstream/python3-configobj.bst
@@ -1,11 +1,12 @@
-kind: distutils
+kind: pip
sources:
- kind: tar
url:
pythonhosted:packages/64/61/079eb60459c44929e684fa7d9e2fdca403f67d64dd9dbac27296be2e0fab/configobj-5.0.6.tar.gz
build-depends:
-- freedesktop-sdk.bst:components/python3-setuptools.bst
+- freedesktop-sdk.bst:components/python3-pip.bst
depends:
+- freedesktop-sdk.bst:components/python3-six.bst
- freedesktop-sdk.bst:components/python3.bst
diff --git a/elements/vm/buildstream/python3-dulwich.bst b/elements/vm/buildstream/python3-dulwich.bst
index f762a5662..4982e2e87 100644
--- a/elements/vm/buildstream/python3-dulwich.bst
+++ b/elements/vm/buildstream/python3-dulwich.bst
@@ -1,15 +1,13 @@
-kind: distutils
+kind: pip
sources:
- kind: tar
url:
pythonhosted:packages/31/02/791c17b92e6d04c43f9b318c95a3f3c3e1ea718aa72ad95b9dac147895fa/dulwich-0.20.21.tar.gz
build-depends:
-- freedesktop-sdk.bst:components/python3-setuptools.bst
+- freedesktop-sdk.bst:components/python3-pip.bst
depends:
-- freedesktop-sdk.bst:components/python3.bst
-
-runtime-depends:
- freedesktop-sdk.bst:components/python3-certifi.bst
- freedesktop-sdk.bst:components/python3-urllib3.bst
+- freedesktop-sdk.bst:components/python3.bst
diff --git a/elements/vm/buildstream/python3-fastimport.bst b/elements/vm/buildstream/python3-fastimport.bst
index 49ee7194d..4bbf39d9a 100644
--- a/elements/vm/buildstream/python3-fastimport.bst
+++ b/elements/vm/buildstream/python3-fastimport.bst
@@ -1,11 +1,11 @@
-kind: distutils
+kind: pip
sources:
- kind: tar
url:
pythonhosted:packages/4b/cf/487330428bed5e21915835096831cfe5fd30d2e68383c33d058a729f8ea3/fastimport-0.9.11.tar.gz
build-depends:
-- freedesktop-sdk.bst:components/python3-setuptools.bst
+- freedesktop-sdk.bst:components/python3-pip.bst
depends:
- freedesktop-sdk.bst:components/python3.bst
diff --git a/elements/vm/buildstream/python3-patiencediff.bst
b/elements/vm/buildstream/python3-patiencediff.bst
new file mode 100644
index 000000000..500cd543e
--- /dev/null
+++ b/elements/vm/buildstream/python3-patiencediff.bst
@@ -0,0 +1,11 @@
+kind: pip
+
+sources:
+- kind: tar
+ url:
pythonhosted:packages/90/ca/13cdabb3c491a0ccd7d580419b96abce3d227d4a6ba674364e6b19d4d67e/patiencediff-0.2.2.tar.gz
+
+build-depends:
+- freedesktop-sdk.bst:components/python3-pip.bst
+
+depends:
+- freedesktop-sdk.bst:components/python3.bst
diff --git a/elements/vm/buildstream/ruamel-yaml-clib.bst b/elements/vm/buildstream/ruamel-yaml-clib.bst
index fe03b09ae..d21a9b865 100644
--- a/elements/vm/buildstream/ruamel-yaml-clib.bst
+++ b/elements/vm/buildstream/ruamel-yaml-clib.bst
@@ -9,6 +9,3 @@ build-depends:
depends:
- freedesktop-sdk.bst:components/python3.bst
-
-variables:
- pip: python3 -m pip
diff --git a/elements/vm/buildstream/ruamel-yaml.bst b/elements/vm/buildstream/ruamel-yaml.bst
index fdd968a2d..b9652b591 100644
--- a/elements/vm/buildstream/ruamel-yaml.bst
+++ b/elements/vm/buildstream/ruamel-yaml.bst
@@ -8,10 +8,5 @@ build-depends:
- freedesktop-sdk.bst:components/python3-pip.bst
depends:
-- freedesktop-sdk.bst:components/python3.bst
-
-runtime-depends:
- vm/buildstream/ruamel-yaml-clib.bst
-
-variables:
- pip: python3 -m pip
+- freedesktop-sdk.bst:components/python3.bst
diff --git a/elements/vm/buildstream/ujson.bst b/elements/vm/buildstream/ujson.bst
index acb63d289..e1d556780 100644
--- a/elements/vm/buildstream/ujson.bst
+++ b/elements/vm/buildstream/ujson.bst
@@ -1,11 +1,13 @@
-kind: distutils
+kind: pip
sources:
- kind: tar
url:
pythonhosted:packages/86/0a/80d87aa4ee79980bddabef13cb7d95de330f85355cf08dfdaf874889b02b/ujson-4.0.2.tar.gz
build-depends:
+- freedesktop-sdk.bst:components/python3-pip.bst
- freedesktop-sdk.bst:components/python3-setuptools-scm.bst
+- freedesktop-sdk.bst:components/python3-wheel.bst
depends:
- freedesktop-sdk.bst:components/python3.bst
diff --git a/project.conf b/project.conf
index b634b95a2..e50923ce9 100644
--- a/project.conf
+++ b/project.conf
@@ -105,23 +105,16 @@ elements:
variables:
cmake-global: -DCMAKE_BUILD_TYPE=RelWithDebInfo
generator: Ninja
- distutils:
- variables:
- python-install: '%{python} setup.py install --root "%{install-root}"'
- fix-pyc-timestamps: ''
- config:
- install-commands:
- (>):
- # There's no way to get the setup.py to install this in the right place.
- - |
- if [ -d '%{install-root}/usr/lib/pkgconfig/' ]; then
- mkdir -p %{install-root}/usr/%{lib}/
- mv -f %{install-root}/usr/lib/pkgconfig/ %{install-root}/usr/%{lib}/
- fi
+
meson:
variables:
meson-global: --buildtype=plain --auto-features=enabled
+ pip:
+ config:
+ install-commands:
+ - python -m pip install --no-build-isolation --root=%{install-root} --prefix=%{prefix} .
+
filter:
config:
include-orphans: true
@@ -317,6 +310,9 @@ variables:
- arch == "riscv64":
go-arch: "riscv64"
+ # can be removed once we move to bst2
+ fix-pyc-timestamps: ''
+
plugins:
- origin: pip
package-name: buildstream-external
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]