Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] [WIP] synapse: update to 1.68.0rc1. New package: python3-setuptools_rust-1.5.2
@ 2022-09-22 14:20 TinfoilSubmarine
  2022-09-22 14:21 ` ahesford
                   ` (21 more replies)
  0 siblings, 22 replies; 23+ messages in thread
From: TinfoilSubmarine @ 2022-09-22 14:20 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1544 bytes --]

There is a new pull request by TinfoilSubmarine against master on the void-packages repository

https://github.com/TinfoilSubmarine/void-packages maint/synapse
https://github.com/void-linux/void-packages/pull/39416

[WIP] synapse: update to 1.68.0rc1. New package: python3-setuptools_rust-1.5.2
synapse includes some rust code now, so we need python3-setuptools_rust.
Also, build-style/python3-*.sh might need adjusting for this, I already spotted
one problem where rustc consumes the TMPDIR environment variable and breaks the
build process.

<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/39416.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-maint/synapse-39416.patch --]
[-- Type: text/x-diff, Size: 6782 bytes --]

From f47163188071945a3bc46e56501483197af250d4 Mon Sep 17 00:00:00 2001
From: Joel Beckmeyer <joel@beckmeyer.us>
Date: Thu, 22 Sep 2022 08:55:24 -0400
Subject: [PATCH 1/4] python3-matrix-common: update to 1.3.0.

---
 srcpkgs/python3-matrix-common/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/python3-matrix-common/template b/srcpkgs/python3-matrix-common/template
index 4ed002f4d2e6..0f71657b1a53 100644
--- a/srcpkgs/python3-matrix-common/template
+++ b/srcpkgs/python3-matrix-common/template
@@ -1,6 +1,6 @@
 # Template file for 'python3-matrix-common'
 pkgname=python3-matrix-common
-version=1.2.1
+version=1.3.0
 revision=1
 wrksrc="matrix-python-common-${version}"
 build_style=python3-pep517
@@ -11,5 +11,5 @@ maintainer="Joel Beckmeyer <joel@beckmeyer.us>"
 license="Apache-2.0"
 homepage="https://github.com/matrix-org/matrix-python-common"
 distfiles="https://github.com/matrix-org/matrix-python-common/archive/v${version}.tar.gz"
-checksum=75ccb0de5b5cd551d81770addea1d2b227831f9cb83d46079ee0c74af0fb0a69
+checksum=9792a69b04904cb2da027890fe07229cc6610254268d2a5037e31aaeb7047104
 make_check=no # requires unpackaged python3 module aiounittest

From 1a612da66789dabc04076ba3c3652e09a6af27e6 Mon Sep 17 00:00:00 2001
From: Joel Beckmeyer <joel@beckmeyer.us>
Date: Thu, 22 Sep 2022 10:06:13 -0400
Subject: [PATCH 2/4] common/build-style/python3-pep517.sh: use TMP to avoid
 side effects with setuptools_rust

---
 common/build-style/python3-pep517.sh | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/common/build-style/python3-pep517.sh b/common/build-style/python3-pep517.sh
index 1eeb4172492e..1d6478388a32 100644
--- a/common/build-style/python3-pep517.sh
+++ b/common/build-style/python3-pep517.sh
@@ -8,7 +8,7 @@ do_build() {
 	: ${make_build_target:=.}
 
 	mkdir -p build
-	TMPDIR=build python3 -m pip wheel --no-deps --use-pep517 --no-clean \
+	TMP=build python3 -m pip wheel --no-deps --use-pep517 --no-clean \
 		--no-build-isolation ${make_build_args} ${make_build_target}
 }
 
@@ -33,9 +33,9 @@ do_install() {
 		make_install_target="${wheelbase//-/_}-${version}-*-*-*.whl"
 	fi
 
-	# If do_build was overridden, make sure the TMPDIR exists
+	# If do_build was overridden, make sure the TMP exists
 	mkdir -p build
-	TMPDIR=build python3 -m pip install --use-pep517 --prefix /usr \
+	TMP=build python3 -m pip install --use-pep517 --prefix /usr \
 		--root ${DESTDIR} --no-deps --no-build-isolation \
 		--no-clean ${make_install_args} ${make_install_target}
 }

From c88346ff06044cadae90a82472ee295a2d2952d8 Mon Sep 17 00:00:00 2001
From: Joel Beckmeyer <joel@beckmeyer.us>
Date: Tue, 20 Sep 2022 14:16:42 -0400
Subject: [PATCH 3/4] New package: python3-setuptools_rust-1.5.2

---
 srcpkgs/python3-setuptools_rust/template | 36 ++++++++++++++++++++++++
 1 file changed, 36 insertions(+)
 create mode 100644 srcpkgs/python3-setuptools_rust/template

diff --git a/srcpkgs/python3-setuptools_rust/template b/srcpkgs/python3-setuptools_rust/template
new file mode 100644
index 000000000000..49de1d92619e
--- /dev/null
+++ b/srcpkgs/python3-setuptools_rust/template
@@ -0,0 +1,36 @@
+# Template file for 'python3-setuptools_rust'
+pkgname=python3-setuptools_rust
+version=1.5.2
+revision=1
+wrksrc="setuptools-rust-${version}"
+build_style=python3-module
+build_helper=rust # for do_check
+hostmakedepends="python3-setuptools"
+depends="python3-setuptools python3-semanticversion python3-typing_extensions"
+checkdepends="${depends} cargo python3-pytest python3-BeautifulSoup4
+ python3-cffi python3-devel"
+short_desc="Setuptools Rust extension plugin"
+maintainer="Joel Beckmeyer <joel@beckmeyer.us>"
+license="MIT"
+homepage="https://github.com/PyO3/setuptools-rust"
+changelog="https://raw.githubusercontent.com/PyO3/setuptools-rust/main/CHANGELOG.md"
+distfiles="${PYPI_SITE}/s/setuptools-rust/setuptools-rust-${version}.tar.gz"
+checksum=d8daccb14dc0eae1b6b6eb3ecef79675bd37b4065369f79c35393dd5c55652c7
+
+do_check() {
+	# taken from
+	# https://raw.githubusercontent.com/archlinux/svntogit-community/packages/python-setuptools-rust/trunk/PKGBUILD
+	rm -rf examples/html-py-ever/tests
+	python setup.py egg_info
+	for dir in examples/*; do
+		pushd $dir
+		PYTHONPATH="$PWD/../.." python setup.py build
+		[[ -d tests ]] && PYTHONPATH="$PWD/build/lib:build/lib.linux-$XBPS_MACHINE-cpython-310" pytest -k "not bench"
+		popd
+	done
+	pytest --doctest-modules setuptools_rust
+}
+
+post_install() {
+	vlicense LICENSE
+}

From bfc71eb4caa984e96a5522989a2c93a45f3625bd Mon Sep 17 00:00:00 2001
From: Joel Beckmeyer <joel@beckmeyer.us>
Date: Tue, 20 Sep 2022 14:16:45 -0400
Subject: [PATCH 4/4] synapse: update to 1.68.0rc1.

---
 srcpkgs/synapse/template | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

diff --git a/srcpkgs/synapse/template b/srcpkgs/synapse/template
index 307d3d08ade8..63edb37f113e 100644
--- a/srcpkgs/synapse/template
+++ b/srcpkgs/synapse/template
@@ -1,11 +1,12 @@
 # Template file for 'synapse'
 pkgname=synapse
-version=1.67.0
+version=1.68.0rc1
 revision=1
 build_style=python3-pep517
+build_helper=rust
 make_check_target=tests
 make_install_target="matrix_synapse-${version}-*-*-*.whl"
-hostmakedepends="python3-poetry-core"
+hostmakedepends="python3-poetry-core python3-setuptools_rust cargo"
 depends="python3-jsonschema python3-frozendict python3-canonicaljson
  python3-signedjson python3-pynacl python3-service_identity python3-Twisted
  python3-openssl python3-yaml python3-pyasn1 python3-pyasn1-modules
@@ -14,7 +15,7 @@ depends="python3-jsonschema python3-frozendict python3-canonicaljson
  python3-setuptools python3-bleach python3-Jinja2 python3-psycopg2 python3-lxml
  python3-saml2 python3-treq python3-macaroons python3-sortedcontainers
  python3-typing_extensions python3-ijson python3-matrix-common
- python3-packaging python3-pydantic"
+ python3-packaging python3-pydantic python3-setuptools_rust"
 checkdepends="$depends python3-parameterized unzip"
 short_desc="Matrix reference homeserver"
 maintainer="Joel Beckmeyer <joel@beckmeyer.us>"
@@ -22,7 +23,11 @@ license="Apache-2.0"
 homepage="https://github.com/matrix-org/synapse"
 changelog="https://raw.githubusercontent.com/matrix-org/synapse/develop/CHANGES.md"
 distfiles="https://github.com/matrix-org/synapse/archive/v${version}.tar.gz"
-checksum=85eeb24890c4b8e68f1e5ca4d5e69e1eb49e67cc33c450dc7c1fe7e70c023c68
+checksum=a05f7ac82c8ee2bd7b7d24c01a040d234be2e7c2e1e24a1156b86d71a9352647
+
+if [ "$CROSS_BUILD" ]; then
+	makedepends+=" rust-std"
+fi
 
 system_accounts="synapse"
 synapse_homedir="/var/lib/synapse"
@@ -37,7 +42,7 @@ pre_check() {
 }
 
 do_check() {
-	PYTHONPATH="." trial3 ${makejobs} tests
+	PYTHONPATH=. trial3 ${makejobs} tests
 }
 
 post_install() {

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [WIP] synapse: update to 1.68.0rc1. New package: python3-setuptools_rust-1.5.2
  2022-09-22 14:20 [PR PATCH] [WIP] synapse: update to 1.68.0rc1. New package: python3-setuptools_rust-1.5.2 TinfoilSubmarine
@ 2022-09-22 14:21 ` ahesford
  2022-09-22 14:21 ` [PR PATCH] [Updated] " TinfoilSubmarine
                   ` (20 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: ahesford @ 2022-09-22 14:21 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 185 bytes --]

New comment by ahesford on void-packages repository

https://github.com/void-linux/void-packages/pull/39416#issuecomment-1255098636

Comment:
We have `python3-setuptools-rust` already.

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PR PATCH] [Updated] [WIP] synapse: update to 1.68.0rc1. New package: python3-setuptools_rust-1.5.2
  2022-09-22 14:20 [PR PATCH] [WIP] synapse: update to 1.68.0rc1. New package: python3-setuptools_rust-1.5.2 TinfoilSubmarine
  2022-09-22 14:21 ` ahesford
@ 2022-09-22 14:21 ` TinfoilSubmarine
  2022-09-22 14:23 ` TinfoilSubmarine
                   ` (19 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: TinfoilSubmarine @ 2022-09-22 14:21 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1549 bytes --]

There is an updated pull request by TinfoilSubmarine against master on the void-packages repository

https://github.com/TinfoilSubmarine/void-packages maint/synapse
https://github.com/void-linux/void-packages/pull/39416

[WIP] synapse: update to 1.68.0rc1. New package: python3-setuptools_rust-1.5.2
synapse includes some rust code now, so we need python3-setuptools_rust.
Also, build-style/python3-*.sh might need adjusting for this, I already spotted
one problem where rustc consumes the TMPDIR environment variable and breaks the
build process.

<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/39416.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-maint/synapse-39416.patch --]
[-- Type: text/x-diff, Size: 6806 bytes --]

From f47163188071945a3bc46e56501483197af250d4 Mon Sep 17 00:00:00 2001
From: Joel Beckmeyer <joel@beckmeyer.us>
Date: Thu, 22 Sep 2022 08:55:24 -0400
Subject: [PATCH 1/4] python3-matrix-common: update to 1.3.0.

---
 srcpkgs/python3-matrix-common/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/python3-matrix-common/template b/srcpkgs/python3-matrix-common/template
index 4ed002f4d2e6..0f71657b1a53 100644
--- a/srcpkgs/python3-matrix-common/template
+++ b/srcpkgs/python3-matrix-common/template
@@ -1,6 +1,6 @@
 # Template file for 'python3-matrix-common'
 pkgname=python3-matrix-common
-version=1.2.1
+version=1.3.0
 revision=1
 wrksrc="matrix-python-common-${version}"
 build_style=python3-pep517
@@ -11,5 +11,5 @@ maintainer="Joel Beckmeyer <joel@beckmeyer.us>"
 license="Apache-2.0"
 homepage="https://github.com/matrix-org/matrix-python-common"
 distfiles="https://github.com/matrix-org/matrix-python-common/archive/v${version}.tar.gz"
-checksum=75ccb0de5b5cd551d81770addea1d2b227831f9cb83d46079ee0c74af0fb0a69
+checksum=9792a69b04904cb2da027890fe07229cc6610254268d2a5037e31aaeb7047104
 make_check=no # requires unpackaged python3 module aiounittest

From bc2d1590b15a99f627d66aa6917bda2bb13ae27b Mon Sep 17 00:00:00 2001
From: Joel Beckmeyer <joel@beckmeyer.us>
Date: Thu, 22 Sep 2022 10:06:13 -0400
Subject: [PATCH 2/4] common/build-style/python3-pep517.sh: use TMP instead of
 TMPDIR

avoids side effects with setuptools_rust / rustc
---
 common/build-style/python3-pep517.sh | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/common/build-style/python3-pep517.sh b/common/build-style/python3-pep517.sh
index 1eeb4172492e..1d6478388a32 100644
--- a/common/build-style/python3-pep517.sh
+++ b/common/build-style/python3-pep517.sh
@@ -8,7 +8,7 @@ do_build() {
 	: ${make_build_target:=.}
 
 	mkdir -p build
-	TMPDIR=build python3 -m pip wheel --no-deps --use-pep517 --no-clean \
+	TMP=build python3 -m pip wheel --no-deps --use-pep517 --no-clean \
 		--no-build-isolation ${make_build_args} ${make_build_target}
 }
 
@@ -33,9 +33,9 @@ do_install() {
 		make_install_target="${wheelbase//-/_}-${version}-*-*-*.whl"
 	fi
 
-	# If do_build was overridden, make sure the TMPDIR exists
+	# If do_build was overridden, make sure the TMP exists
 	mkdir -p build
-	TMPDIR=build python3 -m pip install --use-pep517 --prefix /usr \
+	TMP=build python3 -m pip install --use-pep517 --prefix /usr \
 		--root ${DESTDIR} --no-deps --no-build-isolation \
 		--no-clean ${make_install_args} ${make_install_target}
 }

From 60f712bb2b6b280e90a80132146aeefd6a2d60f5 Mon Sep 17 00:00:00 2001
From: Joel Beckmeyer <joel@beckmeyer.us>
Date: Tue, 20 Sep 2022 14:16:42 -0400
Subject: [PATCH 3/4] New package: python3-setuptools_rust-1.5.2

---
 srcpkgs/python3-setuptools_rust/template | 36 ++++++++++++++++++++++++
 1 file changed, 36 insertions(+)
 create mode 100644 srcpkgs/python3-setuptools_rust/template

diff --git a/srcpkgs/python3-setuptools_rust/template b/srcpkgs/python3-setuptools_rust/template
new file mode 100644
index 000000000000..49de1d92619e
--- /dev/null
+++ b/srcpkgs/python3-setuptools_rust/template
@@ -0,0 +1,36 @@
+# Template file for 'python3-setuptools_rust'
+pkgname=python3-setuptools_rust
+version=1.5.2
+revision=1
+wrksrc="setuptools-rust-${version}"
+build_style=python3-module
+build_helper=rust # for do_check
+hostmakedepends="python3-setuptools"
+depends="python3-setuptools python3-semanticversion python3-typing_extensions"
+checkdepends="${depends} cargo python3-pytest python3-BeautifulSoup4
+ python3-cffi python3-devel"
+short_desc="Setuptools Rust extension plugin"
+maintainer="Joel Beckmeyer <joel@beckmeyer.us>"
+license="MIT"
+homepage="https://github.com/PyO3/setuptools-rust"
+changelog="https://raw.githubusercontent.com/PyO3/setuptools-rust/main/CHANGELOG.md"
+distfiles="${PYPI_SITE}/s/setuptools-rust/setuptools-rust-${version}.tar.gz"
+checksum=d8daccb14dc0eae1b6b6eb3ecef79675bd37b4065369f79c35393dd5c55652c7
+
+do_check() {
+	# taken from
+	# https://raw.githubusercontent.com/archlinux/svntogit-community/packages/python-setuptools-rust/trunk/PKGBUILD
+	rm -rf examples/html-py-ever/tests
+	python setup.py egg_info
+	for dir in examples/*; do
+		pushd $dir
+		PYTHONPATH="$PWD/../.." python setup.py build
+		[[ -d tests ]] && PYTHONPATH="$PWD/build/lib:build/lib.linux-$XBPS_MACHINE-cpython-310" pytest -k "not bench"
+		popd
+	done
+	pytest --doctest-modules setuptools_rust
+}
+
+post_install() {
+	vlicense LICENSE
+}

From 56dea2ee82363e839c181ac6c53af4e48311f7ae Mon Sep 17 00:00:00 2001
From: Joel Beckmeyer <joel@beckmeyer.us>
Date: Tue, 20 Sep 2022 14:16:45 -0400
Subject: [PATCH 4/4] synapse: update to 1.68.0rc1.

---
 srcpkgs/synapse/template | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

diff --git a/srcpkgs/synapse/template b/srcpkgs/synapse/template
index 307d3d08ade8..63edb37f113e 100644
--- a/srcpkgs/synapse/template
+++ b/srcpkgs/synapse/template
@@ -1,11 +1,12 @@
 # Template file for 'synapse'
 pkgname=synapse
-version=1.67.0
+version=1.68.0rc1
 revision=1
 build_style=python3-pep517
+build_helper=rust
 make_check_target=tests
 make_install_target="matrix_synapse-${version}-*-*-*.whl"
-hostmakedepends="python3-poetry-core"
+hostmakedepends="python3-poetry-core python3-setuptools_rust cargo"
 depends="python3-jsonschema python3-frozendict python3-canonicaljson
  python3-signedjson python3-pynacl python3-service_identity python3-Twisted
  python3-openssl python3-yaml python3-pyasn1 python3-pyasn1-modules
@@ -14,7 +15,7 @@ depends="python3-jsonschema python3-frozendict python3-canonicaljson
  python3-setuptools python3-bleach python3-Jinja2 python3-psycopg2 python3-lxml
  python3-saml2 python3-treq python3-macaroons python3-sortedcontainers
  python3-typing_extensions python3-ijson python3-matrix-common
- python3-packaging python3-pydantic"
+ python3-packaging python3-pydantic python3-setuptools_rust"
 checkdepends="$depends python3-parameterized unzip"
 short_desc="Matrix reference homeserver"
 maintainer="Joel Beckmeyer <joel@beckmeyer.us>"
@@ -22,7 +23,11 @@ license="Apache-2.0"
 homepage="https://github.com/matrix-org/synapse"
 changelog="https://raw.githubusercontent.com/matrix-org/synapse/develop/CHANGES.md"
 distfiles="https://github.com/matrix-org/synapse/archive/v${version}.tar.gz"
-checksum=85eeb24890c4b8e68f1e5ca4d5e69e1eb49e67cc33c450dc7c1fe7e70c023c68
+checksum=a05f7ac82c8ee2bd7b7d24c01a040d234be2e7c2e1e24a1156b86d71a9352647
+
+if [ "$CROSS_BUILD" ]; then
+	makedepends+=" rust-std"
+fi
 
 system_accounts="synapse"
 synapse_homedir="/var/lib/synapse"
@@ -37,7 +42,7 @@ pre_check() {
 }
 
 do_check() {
-	PYTHONPATH="." trial3 ${makejobs} tests
+	PYTHONPATH=. trial3 ${makejobs} tests
 }
 
 post_install() {

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [WIP] synapse: update to 1.68.0rc1. New package: python3-setuptools_rust-1.5.2
  2022-09-22 14:20 [PR PATCH] [WIP] synapse: update to 1.68.0rc1. New package: python3-setuptools_rust-1.5.2 TinfoilSubmarine
  2022-09-22 14:21 ` ahesford
  2022-09-22 14:21 ` [PR PATCH] [Updated] " TinfoilSubmarine
@ 2022-09-22 14:23 ` TinfoilSubmarine
  2022-09-22 14:26 ` [WIP] synapse: update to 1.68.0rc1 ahesford
                   ` (18 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: TinfoilSubmarine @ 2022-09-22 14:23 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 191 bytes --]

New comment by TinfoilSubmarine on void-packages repository

https://github.com/void-linux/void-packages/pull/39416#issuecomment-1255101717

Comment:
Ah whoops, must have been the `-` vs `_`

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [WIP] synapse: update to 1.68.0rc1.
  2022-09-22 14:20 [PR PATCH] [WIP] synapse: update to 1.68.0rc1. New package: python3-setuptools_rust-1.5.2 TinfoilSubmarine
                   ` (2 preceding siblings ...)
  2022-09-22 14:23 ` TinfoilSubmarine
@ 2022-09-22 14:26 ` ahesford
  2022-09-22 14:28 ` TinfoilSubmarine
                   ` (17 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: ahesford @ 2022-09-22 14:26 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 429 bytes --]

New comment by ahesford on void-packages repository

https://github.com/void-linux/void-packages/pull/39416#issuecomment-1255106945

Comment:
There was some reason I chose TMPDIR over TMP, but I don't remember now. We'll have to dig into this and determine whether the issue is still relevant.

When you build the package, please inspect `masterdir/tmp` to see if the change to TMP results in artifacts left in that directory.

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [WIP] synapse: update to 1.68.0rc1.
  2022-09-22 14:20 [PR PATCH] [WIP] synapse: update to 1.68.0rc1. New package: python3-setuptools_rust-1.5.2 TinfoilSubmarine
                   ` (3 preceding siblings ...)
  2022-09-22 14:26 ` [WIP] synapse: update to 1.68.0rc1 ahesford
@ 2022-09-22 14:28 ` TinfoilSubmarine
  2022-09-22 14:30 ` [PR PATCH] [Updated] " TinfoilSubmarine
                   ` (16 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: TinfoilSubmarine @ 2022-09-22 14:28 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 657 bytes --]

New comment by TinfoilSubmarine on void-packages repository

https://github.com/void-linux/void-packages/pull/39416#issuecomment-1255109872

Comment:
I saw it lumped into the same functional group [here](https://pip.pypa.io/en/stable/news/#id400), but to be honest didn't research the differences: 
> Deprecate -b/--build/--build-dir/--build-directory. Its current behaviour is confusing and breaks in case different versions of the same distribution need to be built during the resolution process. Using the TMPDIR/TEMP/TMP environment variable, possibly combined with --no-clean covers known use cases. ([#8372](https://github.com/pypa/pip/issues/8372))

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PR PATCH] [Updated] [WIP] synapse: update to 1.68.0rc1.
  2022-09-22 14:20 [PR PATCH] [WIP] synapse: update to 1.68.0rc1. New package: python3-setuptools_rust-1.5.2 TinfoilSubmarine
                   ` (4 preceding siblings ...)
  2022-09-22 14:28 ` TinfoilSubmarine
@ 2022-09-22 14:30 ` TinfoilSubmarine
  2022-09-22 14:37 ` TinfoilSubmarine
                   ` (15 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: TinfoilSubmarine @ 2022-09-22 14:30 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1459 bytes --]

There is an updated pull request by TinfoilSubmarine against master on the void-packages repository

https://github.com/TinfoilSubmarine/void-packages maint/synapse
https://github.com/void-linux/void-packages/pull/39416

[WIP] synapse: update to 1.68.0rc1.
build-style/python3-*.sh might need more adjusting for this, I already spotted
one problem where rustc consumes the TMPDIR environment variable and breaks the
build process.

<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/39416.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-maint/synapse-39416.patch --]
[-- Type: text/x-diff, Size: 4847 bytes --]

From f47163188071945a3bc46e56501483197af250d4 Mon Sep 17 00:00:00 2001
From: Joel Beckmeyer <joel@beckmeyer.us>
Date: Thu, 22 Sep 2022 08:55:24 -0400
Subject: [PATCH 1/3] python3-matrix-common: update to 1.3.0.

---
 srcpkgs/python3-matrix-common/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/python3-matrix-common/template b/srcpkgs/python3-matrix-common/template
index 4ed002f4d2e6..0f71657b1a53 100644
--- a/srcpkgs/python3-matrix-common/template
+++ b/srcpkgs/python3-matrix-common/template
@@ -1,6 +1,6 @@
 # Template file for 'python3-matrix-common'
 pkgname=python3-matrix-common
-version=1.2.1
+version=1.3.0
 revision=1
 wrksrc="matrix-python-common-${version}"
 build_style=python3-pep517
@@ -11,5 +11,5 @@ maintainer="Joel Beckmeyer <joel@beckmeyer.us>"
 license="Apache-2.0"
 homepage="https://github.com/matrix-org/matrix-python-common"
 distfiles="https://github.com/matrix-org/matrix-python-common/archive/v${version}.tar.gz"
-checksum=75ccb0de5b5cd551d81770addea1d2b227831f9cb83d46079ee0c74af0fb0a69
+checksum=9792a69b04904cb2da027890fe07229cc6610254268d2a5037e31aaeb7047104
 make_check=no # requires unpackaged python3 module aiounittest

From bc2d1590b15a99f627d66aa6917bda2bb13ae27b Mon Sep 17 00:00:00 2001
From: Joel Beckmeyer <joel@beckmeyer.us>
Date: Thu, 22 Sep 2022 10:06:13 -0400
Subject: [PATCH 2/3] common/build-style/python3-pep517.sh: use TMP instead of
 TMPDIR

avoids side effects with setuptools_rust / rustc
---
 common/build-style/python3-pep517.sh | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/common/build-style/python3-pep517.sh b/common/build-style/python3-pep517.sh
index 1eeb4172492e..1d6478388a32 100644
--- a/common/build-style/python3-pep517.sh
+++ b/common/build-style/python3-pep517.sh
@@ -8,7 +8,7 @@ do_build() {
 	: ${make_build_target:=.}
 
 	mkdir -p build
-	TMPDIR=build python3 -m pip wheel --no-deps --use-pep517 --no-clean \
+	TMP=build python3 -m pip wheel --no-deps --use-pep517 --no-clean \
 		--no-build-isolation ${make_build_args} ${make_build_target}
 }
 
@@ -33,9 +33,9 @@ do_install() {
 		make_install_target="${wheelbase//-/_}-${version}-*-*-*.whl"
 	fi
 
-	# If do_build was overridden, make sure the TMPDIR exists
+	# If do_build was overridden, make sure the TMP exists
 	mkdir -p build
-	TMPDIR=build python3 -m pip install --use-pep517 --prefix /usr \
+	TMP=build python3 -m pip install --use-pep517 --prefix /usr \
 		--root ${DESTDIR} --no-deps --no-build-isolation \
 		--no-clean ${make_install_args} ${make_install_target}
 }

From b66d618eb7dfbbca90011efc87d2069f86dd8906 Mon Sep 17 00:00:00 2001
From: Joel Beckmeyer <joel@beckmeyer.us>
Date: Tue, 20 Sep 2022 14:16:45 -0400
Subject: [PATCH 3/3] synapse: update to 1.68.0rc1.

---
 srcpkgs/synapse/template | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

diff --git a/srcpkgs/synapse/template b/srcpkgs/synapse/template
index 307d3d08ade8..00ac93979931 100644
--- a/srcpkgs/synapse/template
+++ b/srcpkgs/synapse/template
@@ -1,11 +1,12 @@
 # Template file for 'synapse'
 pkgname=synapse
-version=1.67.0
+version=1.68.0rc1
 revision=1
 build_style=python3-pep517
+build_helper=rust
 make_check_target=tests
 make_install_target="matrix_synapse-${version}-*-*-*.whl"
-hostmakedepends="python3-poetry-core"
+hostmakedepends="python3-poetry-core python3-setuptools-rust cargo"
 depends="python3-jsonschema python3-frozendict python3-canonicaljson
  python3-signedjson python3-pynacl python3-service_identity python3-Twisted
  python3-openssl python3-yaml python3-pyasn1 python3-pyasn1-modules
@@ -14,7 +15,7 @@ depends="python3-jsonschema python3-frozendict python3-canonicaljson
  python3-setuptools python3-bleach python3-Jinja2 python3-psycopg2 python3-lxml
  python3-saml2 python3-treq python3-macaroons python3-sortedcontainers
  python3-typing_extensions python3-ijson python3-matrix-common
- python3-packaging python3-pydantic"
+ python3-packaging python3-pydantic python3-setuptools-rust"
 checkdepends="$depends python3-parameterized unzip"
 short_desc="Matrix reference homeserver"
 maintainer="Joel Beckmeyer <joel@beckmeyer.us>"
@@ -22,7 +23,11 @@ license="Apache-2.0"
 homepage="https://github.com/matrix-org/synapse"
 changelog="https://raw.githubusercontent.com/matrix-org/synapse/develop/CHANGES.md"
 distfiles="https://github.com/matrix-org/synapse/archive/v${version}.tar.gz"
-checksum=85eeb24890c4b8e68f1e5ca4d5e69e1eb49e67cc33c450dc7c1fe7e70c023c68
+checksum=a05f7ac82c8ee2bd7b7d24c01a040d234be2e7c2e1e24a1156b86d71a9352647
+
+if [ "$CROSS_BUILD" ]; then
+	makedepends+=" rust-std"
+fi
 
 system_accounts="synapse"
 synapse_homedir="/var/lib/synapse"
@@ -37,7 +42,7 @@ pre_check() {
 }
 
 do_check() {
-	PYTHONPATH="." trial3 ${makejobs} tests
+	PYTHONPATH=. trial3 ${makejobs} tests
 }
 
 post_install() {

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [WIP] synapse: update to 1.68.0rc1.
  2022-09-22 14:20 [PR PATCH] [WIP] synapse: update to 1.68.0rc1. New package: python3-setuptools_rust-1.5.2 TinfoilSubmarine
                   ` (5 preceding siblings ...)
  2022-09-22 14:30 ` [PR PATCH] [Updated] " TinfoilSubmarine
@ 2022-09-22 14:37 ` TinfoilSubmarine
  2022-09-23 12:12 ` [PR PATCH] [Updated] " TinfoilSubmarine
                   ` (14 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: TinfoilSubmarine @ 2022-09-22 14:37 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 536 bytes --]

New comment by TinfoilSubmarine on void-packages repository

https://github.com/void-linux/void-packages/pull/39416#issuecomment-1255122073

Comment:
> There was some reason I chose TMPDIR over TMP, but I don't remember now. We'll have to dig into this and determine whether the issue is still relevant.
> 
> When you build the package, please inspect `masterdir/tmp` to see if the change to TMP results in artifacts left in that directory.

```
$ ls -a masterdir/tmp
.cache
```

but this was here before the change as well...

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PR PATCH] [Updated] [WIP] synapse: update to 1.68.0rc1.
  2022-09-22 14:20 [PR PATCH] [WIP] synapse: update to 1.68.0rc1. New package: python3-setuptools_rust-1.5.2 TinfoilSubmarine
                   ` (6 preceding siblings ...)
  2022-09-22 14:37 ` TinfoilSubmarine
@ 2022-09-23 12:12 ` TinfoilSubmarine
  2022-09-23 12:40 ` [PR PATCH] [Updated] [WIP] synapse: update to 1.68.0rc2 TinfoilSubmarine
                   ` (13 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: TinfoilSubmarine @ 2022-09-23 12:12 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1459 bytes --]

There is an updated pull request by TinfoilSubmarine against master on the void-packages repository

https://github.com/TinfoilSubmarine/void-packages maint/synapse
https://github.com/void-linux/void-packages/pull/39416

[WIP] synapse: update to 1.68.0rc1.
build-style/python3-*.sh might need more adjusting for this, I already spotted
one problem where rustc consumes the TMPDIR environment variable and breaks the
build process.

<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/39416.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-maint/synapse-39416.patch --]
[-- Type: text/x-diff, Size: 5145 bytes --]

From a829523c223a8ae4a00fdb2a121d367e30e2dcbe Mon Sep 17 00:00:00 2001
From: Joel Beckmeyer <joel@beckmeyer.us>
Date: Thu, 22 Sep 2022 08:55:24 -0400
Subject: [PATCH 1/3] python3-matrix-common: update to 1.3.0.

---
 srcpkgs/python3-matrix-common/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/python3-matrix-common/template b/srcpkgs/python3-matrix-common/template
index 4ed002f4d2e6..0f71657b1a53 100644
--- a/srcpkgs/python3-matrix-common/template
+++ b/srcpkgs/python3-matrix-common/template
@@ -1,6 +1,6 @@
 # Template file for 'python3-matrix-common'
 pkgname=python3-matrix-common
-version=1.2.1
+version=1.3.0
 revision=1
 wrksrc="matrix-python-common-${version}"
 build_style=python3-pep517
@@ -11,5 +11,5 @@ maintainer="Joel Beckmeyer <joel@beckmeyer.us>"
 license="Apache-2.0"
 homepage="https://github.com/matrix-org/matrix-python-common"
 distfiles="https://github.com/matrix-org/matrix-python-common/archive/v${version}.tar.gz"
-checksum=75ccb0de5b5cd551d81770addea1d2b227831f9cb83d46079ee0c74af0fb0a69
+checksum=9792a69b04904cb2da027890fe07229cc6610254268d2a5037e31aaeb7047104
 make_check=no # requires unpackaged python3 module aiounittest

From 3b06e8196fae3bba6f84b18bb7eeb8122a894d46 Mon Sep 17 00:00:00 2001
From: Joel Beckmeyer <joel@beckmeyer.us>
Date: Thu, 22 Sep 2022 10:06:13 -0400
Subject: [PATCH 2/3] common/build-style/python3-pep517.sh: use TMP instead of
 TMPDIR

avoids side effects with setuptools_rust / rustc
---
 common/build-style/python3-pep517.sh | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/common/build-style/python3-pep517.sh b/common/build-style/python3-pep517.sh
index 1eeb4172492e..1d6478388a32 100644
--- a/common/build-style/python3-pep517.sh
+++ b/common/build-style/python3-pep517.sh
@@ -8,7 +8,7 @@ do_build() {
 	: ${make_build_target:=.}
 
 	mkdir -p build
-	TMPDIR=build python3 -m pip wheel --no-deps --use-pep517 --no-clean \
+	TMP=build python3 -m pip wheel --no-deps --use-pep517 --no-clean \
 		--no-build-isolation ${make_build_args} ${make_build_target}
 }
 
@@ -33,9 +33,9 @@ do_install() {
 		make_install_target="${wheelbase//-/_}-${version}-*-*-*.whl"
 	fi
 
-	# If do_build was overridden, make sure the TMPDIR exists
+	# If do_build was overridden, make sure the TMP exists
 	mkdir -p build
-	TMPDIR=build python3 -m pip install --use-pep517 --prefix /usr \
+	TMP=build python3 -m pip install --use-pep517 --prefix /usr \
 		--root ${DESTDIR} --no-deps --no-build-isolation \
 		--no-clean ${make_install_args} ${make_install_target}
 }

From 579a13350b036201c855b0d7e934b7f27743bdc0 Mon Sep 17 00:00:00 2001
From: Joel Beckmeyer <joel@beckmeyer.us>
Date: Tue, 20 Sep 2022 14:16:45 -0400
Subject: [PATCH 3/3] synapse: update to 1.68.0rc2, fix tests.

---
 srcpkgs/synapse/template | 20 +++++++++++++++-----
 1 file changed, 15 insertions(+), 5 deletions(-)

diff --git a/srcpkgs/synapse/template b/srcpkgs/synapse/template
index 307d3d08ade8..de495cdf94c8 100644
--- a/srcpkgs/synapse/template
+++ b/srcpkgs/synapse/template
@@ -1,11 +1,12 @@
 # Template file for 'synapse'
 pkgname=synapse
-version=1.67.0
+version=1.68.0rc2
 revision=1
 build_style=python3-pep517
+build_helper=rust
 make_check_target=tests
 make_install_target="matrix_synapse-${version}-*-*-*.whl"
-hostmakedepends="python3-poetry-core"
+hostmakedepends="python3-poetry-core python3-setuptools-rust cargo"
 depends="python3-jsonschema python3-frozendict python3-canonicaljson
  python3-signedjson python3-pynacl python3-service_identity python3-Twisted
  python3-openssl python3-yaml python3-pyasn1 python3-pyasn1-modules
@@ -14,7 +15,7 @@ depends="python3-jsonschema python3-frozendict python3-canonicaljson
  python3-setuptools python3-bleach python3-Jinja2 python3-psycopg2 python3-lxml
  python3-saml2 python3-treq python3-macaroons python3-sortedcontainers
  python3-typing_extensions python3-ijson python3-matrix-common
- python3-packaging python3-pydantic"
+ python3-packaging python3-pydantic python3-setuptools-rust"
 checkdepends="$depends python3-parameterized unzip"
 short_desc="Matrix reference homeserver"
 maintainer="Joel Beckmeyer <joel@beckmeyer.us>"
@@ -22,7 +23,11 @@ license="Apache-2.0"
 homepage="https://github.com/matrix-org/synapse"
 changelog="https://raw.githubusercontent.com/matrix-org/synapse/develop/CHANGES.md"
 distfiles="https://github.com/matrix-org/synapse/archive/v${version}.tar.gz"
-checksum=85eeb24890c4b8e68f1e5ca4d5e69e1eb49e67cc33c450dc7c1fe7e70c023c68
+checksum=630f091860a33f6a7ef004fa1de311108a04ef41ab796d40205c0be22f8bbb99
+
+if [ "$CROSS_BUILD" ]; then
+	makedepends+=" rust-std"
+fi
 
 system_accounts="synapse"
 synapse_homedir="/var/lib/synapse"
@@ -34,10 +39,15 @@ make_dirs="
 
 pre_check() {
 	unzip ${make_install_target} "*.dist-info/*"
+	cp -r tests "build/lib.linux-$XBPS_MACHINE-cpython-${py3_ver/./}"
 }
 
 do_check() {
-	PYTHONPATH="." trial3 ${makejobs} tests
+	PYTHONPATH="$PWD/build/lib.linux-$XBPS_MACHINE-cpython-${py3_ver/./}":"." trial3 ${makejobs} tests
+}
+
+post_check() {
+	rm -r "build/lib.linux-$XBPS_MACHINE-cpython-${py3_ver/./}/tests"
 }
 
 post_install() {

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PR PATCH] [Updated] [WIP] synapse: update to 1.68.0rc2.
  2022-09-22 14:20 [PR PATCH] [WIP] synapse: update to 1.68.0rc1. New package: python3-setuptools_rust-1.5.2 TinfoilSubmarine
                   ` (7 preceding siblings ...)
  2022-09-23 12:12 ` [PR PATCH] [Updated] " TinfoilSubmarine
@ 2022-09-23 12:40 ` TinfoilSubmarine
  2022-09-26 14:55 ` TinfoilSubmarine
                   ` (12 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: TinfoilSubmarine @ 2022-09-23 12:40 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1459 bytes --]

There is an updated pull request by TinfoilSubmarine against master on the void-packages repository

https://github.com/TinfoilSubmarine/void-packages maint/synapse
https://github.com/void-linux/void-packages/pull/39416

[WIP] synapse: update to 1.68.0rc2.
build-style/python3-*.sh might need more adjusting for this, I already spotted
one problem where rustc consumes the TMPDIR environment variable and breaks the
build process.

<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/39416.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-maint/synapse-39416.patch --]
[-- Type: text/x-diff, Size: 5163 bytes --]

From b225f0a48f96c43353366f7736c731bda1fb4673 Mon Sep 17 00:00:00 2001
From: Joel Beckmeyer <joel@beckmeyer.us>
Date: Thu, 22 Sep 2022 08:55:24 -0400
Subject: [PATCH 1/3] python3-matrix-common: update to 1.3.0.

---
 srcpkgs/python3-matrix-common/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/python3-matrix-common/template b/srcpkgs/python3-matrix-common/template
index 4ed002f4d2e6..0f71657b1a53 100644
--- a/srcpkgs/python3-matrix-common/template
+++ b/srcpkgs/python3-matrix-common/template
@@ -1,6 +1,6 @@
 # Template file for 'python3-matrix-common'
 pkgname=python3-matrix-common
-version=1.2.1
+version=1.3.0
 revision=1
 wrksrc="matrix-python-common-${version}"
 build_style=python3-pep517
@@ -11,5 +11,5 @@ maintainer="Joel Beckmeyer <joel@beckmeyer.us>"
 license="Apache-2.0"
 homepage="https://github.com/matrix-org/matrix-python-common"
 distfiles="https://github.com/matrix-org/matrix-python-common/archive/v${version}.tar.gz"
-checksum=75ccb0de5b5cd551d81770addea1d2b227831f9cb83d46079ee0c74af0fb0a69
+checksum=9792a69b04904cb2da027890fe07229cc6610254268d2a5037e31aaeb7047104
 make_check=no # requires unpackaged python3 module aiounittest

From ad2ce4dd70d14c78da917e92839f125be910fd00 Mon Sep 17 00:00:00 2001
From: Joel Beckmeyer <joel@beckmeyer.us>
Date: Thu, 22 Sep 2022 10:06:13 -0400
Subject: [PATCH 2/3] common/build-style/python3-pep517.sh: use TMP instead of
 TMPDIR

avoids side effects with setuptools_rust / rustc
---
 common/build-style/python3-pep517.sh | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/common/build-style/python3-pep517.sh b/common/build-style/python3-pep517.sh
index 1eeb4172492e..1d6478388a32 100644
--- a/common/build-style/python3-pep517.sh
+++ b/common/build-style/python3-pep517.sh
@@ -8,7 +8,7 @@ do_build() {
 	: ${make_build_target:=.}
 
 	mkdir -p build
-	TMPDIR=build python3 -m pip wheel --no-deps --use-pep517 --no-clean \
+	TMP=build python3 -m pip wheel --no-deps --use-pep517 --no-clean \
 		--no-build-isolation ${make_build_args} ${make_build_target}
 }
 
@@ -33,9 +33,9 @@ do_install() {
 		make_install_target="${wheelbase//-/_}-${version}-*-*-*.whl"
 	fi
 
-	# If do_build was overridden, make sure the TMPDIR exists
+	# If do_build was overridden, make sure the TMP exists
 	mkdir -p build
-	TMPDIR=build python3 -m pip install --use-pep517 --prefix /usr \
+	TMP=build python3 -m pip install --use-pep517 --prefix /usr \
 		--root ${DESTDIR} --no-deps --no-build-isolation \
 		--no-clean ${make_install_args} ${make_install_target}
 }

From e60d6b50f7ed2a03b6e46d7435b04a3295c400da Mon Sep 17 00:00:00 2001
From: Joel Beckmeyer <joel@beckmeyer.us>
Date: Tue, 20 Sep 2022 14:16:45 -0400
Subject: [PATCH 3/3] synapse: update to 1.68.0rc2, fix tests.

---
 srcpkgs/synapse/template | 20 +++++++++++++++-----
 1 file changed, 15 insertions(+), 5 deletions(-)

diff --git a/srcpkgs/synapse/template b/srcpkgs/synapse/template
index 307d3d08ade8..f3e76898454a 100644
--- a/srcpkgs/synapse/template
+++ b/srcpkgs/synapse/template
@@ -1,11 +1,12 @@
 # Template file for 'synapse'
 pkgname=synapse
-version=1.67.0
+version=1.68.0rc2
 revision=1
 build_style=python3-pep517
+build_helper=rust
 make_check_target=tests
 make_install_target="matrix_synapse-${version}-*-*-*.whl"
-hostmakedepends="python3-poetry-core"
+hostmakedepends="python3-poetry-core python3-setuptools-rust cargo"
 depends="python3-jsonschema python3-frozendict python3-canonicaljson
  python3-signedjson python3-pynacl python3-service_identity python3-Twisted
  python3-openssl python3-yaml python3-pyasn1 python3-pyasn1-modules
@@ -14,7 +15,7 @@ depends="python3-jsonschema python3-frozendict python3-canonicaljson
  python3-setuptools python3-bleach python3-Jinja2 python3-psycopg2 python3-lxml
  python3-saml2 python3-treq python3-macaroons python3-sortedcontainers
  python3-typing_extensions python3-ijson python3-matrix-common
- python3-packaging python3-pydantic"
+ python3-packaging python3-pydantic python3-setuptools-rust"
 checkdepends="$depends python3-parameterized unzip"
 short_desc="Matrix reference homeserver"
 maintainer="Joel Beckmeyer <joel@beckmeyer.us>"
@@ -22,7 +23,11 @@ license="Apache-2.0"
 homepage="https://github.com/matrix-org/synapse"
 changelog="https://raw.githubusercontent.com/matrix-org/synapse/develop/CHANGES.md"
 distfiles="https://github.com/matrix-org/synapse/archive/v${version}.tar.gz"
-checksum=85eeb24890c4b8e68f1e5ca4d5e69e1eb49e67cc33c450dc7c1fe7e70c023c68
+checksum=630f091860a33f6a7ef004fa1de311108a04ef41ab796d40205c0be22f8bbb99
+
+if [ "$CROSS_BUILD" ]; then
+	makedepends+=" rust-std"
+fi
 
 system_accounts="synapse"
 synapse_homedir="/var/lib/synapse"
@@ -34,10 +39,15 @@ make_dirs="
 
 pre_check() {
 	unzip ${make_install_target} "*.dist-info/*"
+	cp -r tests "build/lib.linux-${XBPS_MACHINE/-*/}-cpython-${py3_ver/./}"
 }
 
 do_check() {
-	PYTHONPATH="." trial3 ${makejobs} tests
+	PYTHONPATH="$PWD/build/lib.linux-${XBPS_MACHINE/-*/}-cpython-${py3_ver/./}":"." trial3 ${makejobs} tests
+}
+
+post_check() {
+	rm -r "build/lib.linux-${XBPS_MACHINE/-*/}-cpython-${py3_ver/./}/tests"
 }
 
 post_install() {

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PR PATCH] [Updated] [WIP] synapse: update to 1.68.0rc2.
  2022-09-22 14:20 [PR PATCH] [WIP] synapse: update to 1.68.0rc1. New package: python3-setuptools_rust-1.5.2 TinfoilSubmarine
                   ` (8 preceding siblings ...)
  2022-09-23 12:40 ` [PR PATCH] [Updated] [WIP] synapse: update to 1.68.0rc2 TinfoilSubmarine
@ 2022-09-26 14:55 ` TinfoilSubmarine
  2022-09-26 14:56 ` [PR REVIEW] " ahesford
                   ` (11 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: TinfoilSubmarine @ 2022-09-26 14:55 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1459 bytes --]

There is an updated pull request by TinfoilSubmarine against master on the void-packages repository

https://github.com/TinfoilSubmarine/void-packages maint/synapse
https://github.com/void-linux/void-packages/pull/39416

[WIP] synapse: update to 1.68.0rc2.
build-style/python3-*.sh might need more adjusting for this, I already spotted
one problem where rustc consumes the TMPDIR environment variable and breaks the
build process.

<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/39416.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-maint/synapse-39416.patch --]
[-- Type: text/x-diff, Size: 5163 bytes --]

From d3f42ea05151064013a508c893d9513aa855183b Mon Sep 17 00:00:00 2001
From: Joel Beckmeyer <joel@beckmeyer.us>
Date: Thu, 22 Sep 2022 08:55:24 -0400
Subject: [PATCH 1/3] python3-matrix-common: update to 1.3.0.

---
 srcpkgs/python3-matrix-common/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/python3-matrix-common/template b/srcpkgs/python3-matrix-common/template
index 4ed002f4d2e6..0f71657b1a53 100644
--- a/srcpkgs/python3-matrix-common/template
+++ b/srcpkgs/python3-matrix-common/template
@@ -1,6 +1,6 @@
 # Template file for 'python3-matrix-common'
 pkgname=python3-matrix-common
-version=1.2.1
+version=1.3.0
 revision=1
 wrksrc="matrix-python-common-${version}"
 build_style=python3-pep517
@@ -11,5 +11,5 @@ maintainer="Joel Beckmeyer <joel@beckmeyer.us>"
 license="Apache-2.0"
 homepage="https://github.com/matrix-org/matrix-python-common"
 distfiles="https://github.com/matrix-org/matrix-python-common/archive/v${version}.tar.gz"
-checksum=75ccb0de5b5cd551d81770addea1d2b227831f9cb83d46079ee0c74af0fb0a69
+checksum=9792a69b04904cb2da027890fe07229cc6610254268d2a5037e31aaeb7047104
 make_check=no # requires unpackaged python3 module aiounittest

From 009e72012672348ace37767d3aa4be377d410779 Mon Sep 17 00:00:00 2001
From: Joel Beckmeyer <joel@beckmeyer.us>
Date: Thu, 22 Sep 2022 10:06:13 -0400
Subject: [PATCH 2/3] common/build-style/python3-pep517.sh: use TMP instead of
 TMPDIR

avoids side effects with setuptools_rust / rustc
---
 common/build-style/python3-pep517.sh | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/common/build-style/python3-pep517.sh b/common/build-style/python3-pep517.sh
index 1eeb4172492e..1d6478388a32 100644
--- a/common/build-style/python3-pep517.sh
+++ b/common/build-style/python3-pep517.sh
@@ -8,7 +8,7 @@ do_build() {
 	: ${make_build_target:=.}
 
 	mkdir -p build
-	TMPDIR=build python3 -m pip wheel --no-deps --use-pep517 --no-clean \
+	TMP=build python3 -m pip wheel --no-deps --use-pep517 --no-clean \
 		--no-build-isolation ${make_build_args} ${make_build_target}
 }
 
@@ -33,9 +33,9 @@ do_install() {
 		make_install_target="${wheelbase//-/_}-${version}-*-*-*.whl"
 	fi
 
-	# If do_build was overridden, make sure the TMPDIR exists
+	# If do_build was overridden, make sure the TMP exists
 	mkdir -p build
-	TMPDIR=build python3 -m pip install --use-pep517 --prefix /usr \
+	TMP=build python3 -m pip install --use-pep517 --prefix /usr \
 		--root ${DESTDIR} --no-deps --no-build-isolation \
 		--no-clean ${make_install_args} ${make_install_target}
 }

From ce4c611288ef030e612c80d12d6be0e5e9e12fb2 Mon Sep 17 00:00:00 2001
From: Joel Beckmeyer <joel@beckmeyer.us>
Date: Tue, 20 Sep 2022 14:16:45 -0400
Subject: [PATCH 3/3] synapse: update to 1.68.0rc2, fix tests.

---
 srcpkgs/synapse/template | 20 +++++++++++++++-----
 1 file changed, 15 insertions(+), 5 deletions(-)

diff --git a/srcpkgs/synapse/template b/srcpkgs/synapse/template
index 307d3d08ade8..f3e76898454a 100644
--- a/srcpkgs/synapse/template
+++ b/srcpkgs/synapse/template
@@ -1,11 +1,12 @@
 # Template file for 'synapse'
 pkgname=synapse
-version=1.67.0
+version=1.68.0rc2
 revision=1
 build_style=python3-pep517
+build_helper=rust
 make_check_target=tests
 make_install_target="matrix_synapse-${version}-*-*-*.whl"
-hostmakedepends="python3-poetry-core"
+hostmakedepends="python3-poetry-core python3-setuptools-rust cargo"
 depends="python3-jsonschema python3-frozendict python3-canonicaljson
  python3-signedjson python3-pynacl python3-service_identity python3-Twisted
  python3-openssl python3-yaml python3-pyasn1 python3-pyasn1-modules
@@ -14,7 +15,7 @@ depends="python3-jsonschema python3-frozendict python3-canonicaljson
  python3-setuptools python3-bleach python3-Jinja2 python3-psycopg2 python3-lxml
  python3-saml2 python3-treq python3-macaroons python3-sortedcontainers
  python3-typing_extensions python3-ijson python3-matrix-common
- python3-packaging python3-pydantic"
+ python3-packaging python3-pydantic python3-setuptools-rust"
 checkdepends="$depends python3-parameterized unzip"
 short_desc="Matrix reference homeserver"
 maintainer="Joel Beckmeyer <joel@beckmeyer.us>"
@@ -22,7 +23,11 @@ license="Apache-2.0"
 homepage="https://github.com/matrix-org/synapse"
 changelog="https://raw.githubusercontent.com/matrix-org/synapse/develop/CHANGES.md"
 distfiles="https://github.com/matrix-org/synapse/archive/v${version}.tar.gz"
-checksum=85eeb24890c4b8e68f1e5ca4d5e69e1eb49e67cc33c450dc7c1fe7e70c023c68
+checksum=630f091860a33f6a7ef004fa1de311108a04ef41ab796d40205c0be22f8bbb99
+
+if [ "$CROSS_BUILD" ]; then
+	makedepends+=" rust-std"
+fi
 
 system_accounts="synapse"
 synapse_homedir="/var/lib/synapse"
@@ -34,10 +39,15 @@ make_dirs="
 
 pre_check() {
 	unzip ${make_install_target} "*.dist-info/*"
+	cp -r tests "build/lib.linux-${XBPS_MACHINE/-*/}-cpython-${py3_ver/./}"
 }
 
 do_check() {
-	PYTHONPATH="." trial3 ${makejobs} tests
+	PYTHONPATH="$PWD/build/lib.linux-${XBPS_MACHINE/-*/}-cpython-${py3_ver/./}":"." trial3 ${makejobs} tests
+}
+
+post_check() {
+	rm -r "build/lib.linux-${XBPS_MACHINE/-*/}-cpython-${py3_ver/./}/tests"
 }
 
 post_install() {

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PR REVIEW] [WIP] synapse: update to 1.68.0rc2.
  2022-09-22 14:20 [PR PATCH] [WIP] synapse: update to 1.68.0rc1. New package: python3-setuptools_rust-1.5.2 TinfoilSubmarine
                   ` (9 preceding siblings ...)
  2022-09-26 14:55 ` TinfoilSubmarine
@ 2022-09-26 14:56 ` ahesford
  2022-09-26 14:56 ` ahesford
                   ` (10 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: ahesford @ 2022-09-26 14:56 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 214 bytes --]

New review comment by ahesford on void-packages repository

https://github.com/void-linux/void-packages/pull/39416#discussion_r980135920

Comment:
```suggestion
	rm -r build/lib*/tests
```
out to be sufficient.

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PR REVIEW] [WIP] synapse: update to 1.68.0rc2.
  2022-09-22 14:20 [PR PATCH] [WIP] synapse: update to 1.68.0rc1. New package: python3-setuptools_rust-1.5.2 TinfoilSubmarine
                   ` (12 preceding siblings ...)
  2022-09-26 14:56 ` ahesford
@ 2022-09-26 14:56 ` ahesford
  2022-09-26 14:56 ` ahesford
                   ` (7 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: ahesford @ 2022-09-26 14:56 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 333 bytes --]

New review comment by ahesford on void-packages repository

https://github.com/void-linux/void-packages/pull/39416#discussion_r980133464

Comment:
```suggestion
	[ -d build/lib* ] && cp -r tests build/lib*
```
will avoid hard-to-read shell substitutions and  should trigger a failure if more than one build/lib* matches the glob.

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PR REVIEW] [WIP] synapse: update to 1.68.0rc2.
  2022-09-22 14:20 [PR PATCH] [WIP] synapse: update to 1.68.0rc1. New package: python3-setuptools_rust-1.5.2 TinfoilSubmarine
                   ` (10 preceding siblings ...)
  2022-09-26 14:56 ` [PR REVIEW] " ahesford
@ 2022-09-26 14:56 ` ahesford
  2022-09-26 14:56 ` ahesford
                   ` (9 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: ahesford @ 2022-09-26 14:56 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 613 bytes --]

New review comment by ahesford on void-packages repository

https://github.com/void-linux/void-packages/pull/39416#discussion_r980125414

Comment:
```suggestion
	TMPDIR="${PWD}/build" python3 -m pip wheel --no-deps --use-pep517 --no-clean \
```
A full path seems to fix the rust build. Because I can't recall why I chose `$TMPDIR`, but `$TMPDIR` is the variable [identified by POSIX](https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap08.html#tag_08_03), we should prefer this over `$TMP`. Still, the change to an absolute path should be tested on at least a few other `python3-pep517` packages.

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PR REVIEW] [WIP] synapse: update to 1.68.0rc2.
  2022-09-22 14:20 [PR PATCH] [WIP] synapse: update to 1.68.0rc1. New package: python3-setuptools_rust-1.5.2 TinfoilSubmarine
                   ` (13 preceding siblings ...)
  2022-09-26 14:56 ` ahesford
@ 2022-09-26 14:56 ` ahesford
  2022-09-26 14:56 ` ahesford
                   ` (6 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: ahesford @ 2022-09-26 14:56 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 271 bytes --]

New review comment by ahesford on void-packages repository

https://github.com/void-linux/void-packages/pull/39416#discussion_r980134648

Comment:
```suggestion
	PYTHONPATH="$(cd build/lib* && pwd):." trial3 ${makejobs} tests
```
as in the python3-module build style.

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PR REVIEW] [WIP] synapse: update to 1.68.0rc2.
  2022-09-22 14:20 [PR PATCH] [WIP] synapse: update to 1.68.0rc1. New package: python3-setuptools_rust-1.5.2 TinfoilSubmarine
                   ` (14 preceding siblings ...)
  2022-09-26 14:56 ` ahesford
@ 2022-09-26 14:56 ` ahesford
  2022-09-26 15:49 ` TinfoilSubmarine
                   ` (5 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: ahesford @ 2022-09-26 14:56 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 203 bytes --]

New review comment by ahesford on void-packages repository

https://github.com/void-linux/void-packages/pull/39416#discussion_r980127851

Comment:
Why is `python3-setuptools-rust` a run-time dependency?

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PR REVIEW] [WIP] synapse: update to 1.68.0rc2.
  2022-09-22 14:20 [PR PATCH] [WIP] synapse: update to 1.68.0rc1. New package: python3-setuptools_rust-1.5.2 TinfoilSubmarine
                   ` (11 preceding siblings ...)
  2022-09-26 14:56 ` ahesford
@ 2022-09-26 14:56 ` ahesford
  2022-09-26 14:56 ` ahesford
                   ` (8 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: ahesford @ 2022-09-26 14:56 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 294 bytes --]

New review comment by ahesford on void-packages repository

https://github.com/void-linux/void-packages/pull/39416#discussion_r980125748

Comment:
```suggestion
	TMPDIR="${PWD}/build" python3 -m pip install --use-pep517 --prefix /usr \
```
As above, an absolute path seems to fix the build.

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PR REVIEW] [WIP] synapse: update to 1.68.0rc2.
  2022-09-22 14:20 [PR PATCH] [WIP] synapse: update to 1.68.0rc1. New package: python3-setuptools_rust-1.5.2 TinfoilSubmarine
                   ` (15 preceding siblings ...)
  2022-09-26 14:56 ` ahesford
@ 2022-09-26 15:49 ` TinfoilSubmarine
  2022-09-26 16:07 ` ahesford
                   ` (4 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: TinfoilSubmarine @ 2022-09-26 15:49 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 527 bytes --]

New review comment by TinfoilSubmarine on void-packages repository

https://github.com/void-linux/void-packages/pull/39416#discussion_r980225145

Comment:
It is a required runtime dependency. Running without it gives:
```
ERROR:root:Synapse 1.68.0rc2 needs setuptools_rust, but it is not installed
Missing Requirements: "setuptools_rust"
To install run:
    pip install --upgrade --force "setuptools_rust"
```

See https://github.com/matrix-org/synapse/blob/682385917dd8d3c877da109c4cdc0988073b5b00/pyproject.toml#L185

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PR REVIEW] [WIP] synapse: update to 1.68.0rc2.
  2022-09-22 14:20 [PR PATCH] [WIP] synapse: update to 1.68.0rc1. New package: python3-setuptools_rust-1.5.2 TinfoilSubmarine
                   ` (16 preceding siblings ...)
  2022-09-26 15:49 ` TinfoilSubmarine
@ 2022-09-26 16:07 ` ahesford
  2022-09-26 16:27 ` [PR PATCH] [Updated] " TinfoilSubmarine
                   ` (3 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: ahesford @ 2022-09-26 16:07 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 491 bytes --]

New review comment by ahesford on void-packages repository

https://github.com/void-linux/void-packages/pull/39416#discussion_r980244173

Comment:
What a mess; they can't properly specify build-time dependencies and work around the problem by abusing run-time dependencies.

Please try patching out the apparently needless setuptools_rust dependency in `pyproject.toml` and confirm that the program runs as expected. We don't need to perpetuate failures of the Python packaging ecosystem.

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PR PATCH] [Updated] [WIP] synapse: update to 1.68.0rc2.
  2022-09-22 14:20 [PR PATCH] [WIP] synapse: update to 1.68.0rc1. New package: python3-setuptools_rust-1.5.2 TinfoilSubmarine
                   ` (17 preceding siblings ...)
  2022-09-26 16:07 ` ahesford
@ 2022-09-26 16:27 ` TinfoilSubmarine
  2022-09-26 16:38 ` [PR REVIEW] " TinfoilSubmarine
                   ` (2 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: TinfoilSubmarine @ 2022-09-26 16:27 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1459 bytes --]

There is an updated pull request by TinfoilSubmarine against master on the void-packages repository

https://github.com/TinfoilSubmarine/void-packages maint/synapse
https://github.com/void-linux/void-packages/pull/39416

[WIP] synapse: update to 1.68.0rc2.
build-style/python3-*.sh might need more adjusting for this, I already spotted
one problem where rustc consumes the TMPDIR environment variable and breaks the
build process.

<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/39416.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-maint/synapse-39416.patch --]
[-- Type: text/x-diff, Size: 4537 bytes --]

From 26c29085a8c6b5e80300ee85c6cf3aa5cbc6e2a4 Mon Sep 17 00:00:00 2001
From: Joel Beckmeyer <joel@beckmeyer.us>
Date: Thu, 22 Sep 2022 08:55:24 -0400
Subject: [PATCH 1/3] python3-matrix-common: update to 1.3.0.

---
 srcpkgs/python3-matrix-common/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/python3-matrix-common/template b/srcpkgs/python3-matrix-common/template
index 4ed002f4d2e6..0f71657b1a53 100644
--- a/srcpkgs/python3-matrix-common/template
+++ b/srcpkgs/python3-matrix-common/template
@@ -1,6 +1,6 @@
 # Template file for 'python3-matrix-common'
 pkgname=python3-matrix-common
-version=1.2.1
+version=1.3.0
 revision=1
 wrksrc="matrix-python-common-${version}"
 build_style=python3-pep517
@@ -11,5 +11,5 @@ maintainer="Joel Beckmeyer <joel@beckmeyer.us>"
 license="Apache-2.0"
 homepage="https://github.com/matrix-org/matrix-python-common"
 distfiles="https://github.com/matrix-org/matrix-python-common/archive/v${version}.tar.gz"
-checksum=75ccb0de5b5cd551d81770addea1d2b227831f9cb83d46079ee0c74af0fb0a69
+checksum=9792a69b04904cb2da027890fe07229cc6610254268d2a5037e31aaeb7047104
 make_check=no # requires unpackaged python3 module aiounittest

From ca3c555a16a821338a12739f8ba618ef3ccf7f90 Mon Sep 17 00:00:00 2001
From: Joel Beckmeyer <joel@beckmeyer.us>
Date: Thu, 22 Sep 2022 10:06:13 -0400
Subject: [PATCH 2/3] common/build-style/python3-pep517.sh: use full path for
 TMPDIR

fixes side effects with setuptools_rust / rustc
---
 common/build-style/python3-pep517.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/common/build-style/python3-pep517.sh b/common/build-style/python3-pep517.sh
index 1eeb4172492e..da1e238e1192 100644
--- a/common/build-style/python3-pep517.sh
+++ b/common/build-style/python3-pep517.sh
@@ -8,7 +8,7 @@ do_build() {
 	: ${make_build_target:=.}
 
 	mkdir -p build
-	TMPDIR=build python3 -m pip wheel --no-deps --use-pep517 --no-clean \
+	TMPDIR="${PWD}/build" python3 -m pip wheel --no-deps --use-pep517 --no-clean \
 		--no-build-isolation ${make_build_args} ${make_build_target}
 }
 
@@ -35,7 +35,7 @@ do_install() {
 
 	# If do_build was overridden, make sure the TMPDIR exists
 	mkdir -p build
-	TMPDIR=build python3 -m pip install --use-pep517 --prefix /usr \
+	TMPDIR="${PWD}/build" python3 -m pip install --use-pep517 --prefix /usr \
 		--root ${DESTDIR} --no-deps --no-build-isolation \
 		--no-clean ${make_install_args} ${make_install_target}
 }

From 95251712e67548f0d42167cbba11cbe7807b4337 Mon Sep 17 00:00:00 2001
From: Joel Beckmeyer <joel@beckmeyer.us>
Date: Tue, 20 Sep 2022 14:16:45 -0400
Subject: [PATCH 3/3] synapse: update to 1.68.0rc2, fix tests.

---
 srcpkgs/synapse/template | 22 ++++++++++++++++++----
 1 file changed, 18 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/synapse/template b/srcpkgs/synapse/template
index 307d3d08ade8..f0d499f68a88 100644
--- a/srcpkgs/synapse/template
+++ b/srcpkgs/synapse/template
@@ -1,11 +1,12 @@
 # Template file for 'synapse'
 pkgname=synapse
-version=1.67.0
+version=1.68.0rc2
 revision=1
 build_style=python3-pep517
+build_helper=rust
 make_check_target=tests
 make_install_target="matrix_synapse-${version}-*-*-*.whl"
-hostmakedepends="python3-poetry-core"
+hostmakedepends="python3-poetry-core python3-setuptools-rust cargo"
 depends="python3-jsonschema python3-frozendict python3-canonicaljson
  python3-signedjson python3-pynacl python3-service_identity python3-Twisted
  python3-openssl python3-yaml python3-pyasn1 python3-pyasn1-modules
@@ -22,7 +23,11 @@ license="Apache-2.0"
 homepage="https://github.com/matrix-org/synapse"
 changelog="https://raw.githubusercontent.com/matrix-org/synapse/develop/CHANGES.md"
 distfiles="https://github.com/matrix-org/synapse/archive/v${version}.tar.gz"
-checksum=85eeb24890c4b8e68f1e5ca4d5e69e1eb49e67cc33c450dc7c1fe7e70c023c68
+checksum=630f091860a33f6a7ef004fa1de311108a04ef41ab796d40205c0be22f8bbb99
+
+if [ "$CROSS_BUILD" ]; then
+	makedepends+=" rust-std"
+fi
 
 system_accounts="synapse"
 synapse_homedir="/var/lib/synapse"
@@ -32,12 +37,21 @@ make_dirs="
 	/etc/synapse 755 synapse synapse
 	/var/log/synapse 0755 synapse synapse"
 
+post_patch() {
+	vsed -i '/^setuptools_rust/d' pyproject.toml
+}
+
 pre_check() {
 	unzip ${make_install_target} "*.dist-info/*"
+	[ -d build/lib* ] && cp -r tests build/lib*
 }
 
 do_check() {
-	PYTHONPATH="." trial3 ${makejobs} tests
+	PYTHONPATH="$(cd build/lib* && pwd):." trial3 ${makejobs} tests
+}
+
+post_check() {
+	rm -r build/lib*/tests
 }
 
 post_install() {

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PR REVIEW] [WIP] synapse: update to 1.68.0rc2.
  2022-09-22 14:20 [PR PATCH] [WIP] synapse: update to 1.68.0rc1. New package: python3-setuptools_rust-1.5.2 TinfoilSubmarine
                   ` (18 preceding siblings ...)
  2022-09-26 16:27 ` [PR PATCH] [Updated] " TinfoilSubmarine
@ 2022-09-26 16:38 ` TinfoilSubmarine
  2022-09-27 12:44 ` [PR PATCH] [Updated] " TinfoilSubmarine
  2022-09-28 14:41 ` [PR PATCH] [Closed]: synapse: update to 1.68.0 ahesford
  21 siblings, 0 replies; 23+ messages in thread
From: TinfoilSubmarine @ 2022-09-26 16:38 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 335 bytes --]

New review comment by TinfoilSubmarine on void-packages repository

https://github.com/void-linux/void-packages/pull/39416#discussion_r980277366

Comment:
Tested and works with 

- `asciinema`
- `hatch`
- `python3-aiofiles`
- `python3-gnupg`
- `python3-imaplib2`
- `python3-jsonschema`
- `python3-unpaddedbase64`
- `rofi-rbw`

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PR PATCH] [Updated] [WIP] synapse: update to 1.68.0rc2.
  2022-09-22 14:20 [PR PATCH] [WIP] synapse: update to 1.68.0rc1. New package: python3-setuptools_rust-1.5.2 TinfoilSubmarine
                   ` (19 preceding siblings ...)
  2022-09-26 16:38 ` [PR REVIEW] " TinfoilSubmarine
@ 2022-09-27 12:44 ` TinfoilSubmarine
  2022-09-28 14:41 ` [PR PATCH] [Closed]: synapse: update to 1.68.0 ahesford
  21 siblings, 0 replies; 23+ messages in thread
From: TinfoilSubmarine @ 2022-09-27 12:44 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1459 bytes --]

There is an updated pull request by TinfoilSubmarine against master on the void-packages repository

https://github.com/TinfoilSubmarine/void-packages maint/synapse
https://github.com/void-linux/void-packages/pull/39416

[WIP] synapse: update to 1.68.0rc2.
build-style/python3-*.sh might need more adjusting for this, I already spotted
one problem where rustc consumes the TMPDIR environment variable and breaks the
build process.

<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/39416.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-maint/synapse-39416.patch --]
[-- Type: text/x-diff, Size: 7086 bytes --]

From f6c5af6b515ba737f201ed7379d27fe3109dd810 Mon Sep 17 00:00:00 2001
From: Joel Beckmeyer <joel@beckmeyer.us>
Date: Thu, 22 Sep 2022 10:06:13 -0400
Subject: [PATCH 1/5] common/build-style/python3-pep517.sh: use full path for
 TMPDIR

fixes side effects with setuptools_rust / rustc
---
 common/build-style/python3-pep517.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/common/build-style/python3-pep517.sh b/common/build-style/python3-pep517.sh
index 1eeb4172492e..da1e238e1192 100644
--- a/common/build-style/python3-pep517.sh
+++ b/common/build-style/python3-pep517.sh
@@ -8,7 +8,7 @@ do_build() {
 	: ${make_build_target:=.}
 
 	mkdir -p build
-	TMPDIR=build python3 -m pip wheel --no-deps --use-pep517 --no-clean \
+	TMPDIR="${PWD}/build" python3 -m pip wheel --no-deps --use-pep517 --no-clean \
 		--no-build-isolation ${make_build_args} ${make_build_target}
 }
 
@@ -35,7 +35,7 @@ do_install() {
 
 	# If do_build was overridden, make sure the TMPDIR exists
 	mkdir -p build
-	TMPDIR=build python3 -m pip install --use-pep517 --prefix /usr \
+	TMPDIR="${PWD}/build" python3 -m pip install --use-pep517 --prefix /usr \
 		--root ${DESTDIR} --no-deps --no-build-isolation \
 		--no-clean ${make_install_args} ${make_install_target}
 }

From bd0b7c2d7940d8e5abd688e639d8a69126540688 Mon Sep 17 00:00:00 2001
From: Joel Beckmeyer <joel@beckmeyer.us>
Date: Mon, 26 Sep 2022 12:59:19 -0400
Subject: [PATCH 2/5] python3-canonicaljson: update to 1.6.3.

---
 srcpkgs/python3-canonicaljson/template | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/python3-canonicaljson/template b/srcpkgs/python3-canonicaljson/template
index 2da9cde02ccb..5da283988e5f 100644
--- a/srcpkgs/python3-canonicaljson/template
+++ b/srcpkgs/python3-canonicaljson/template
@@ -1,10 +1,10 @@
 # Template file for 'python3-canonicaljson'
 pkgname=python3-canonicaljson
-version=1.6.2
+version=1.6.3
 revision=1
 wrksrc="canonicaljson-${version}"
-build_style=python3-module
-hostmakedepends="python3-setuptools"
+build_style=python3-pep517
+hostmakedepends="python3-setuptools python3-wheel"
 depends="python3-simplejson python3-frozendict"
 checkdepends="${depends} python3-pytest"
 short_desc="Canonical JSON"
@@ -12,4 +12,5 @@ maintainer="Joel Beckmeyer <joel@beckmeyer.us>"
 license="Apache-2.0"
 homepage="https://github.com/matrix-org/python-canonicaljson"
 distfiles="${PYPI_SITE}/c/canonicaljson/canonicaljson-${version}.tar.gz"
-checksum=af00be8ce9c589857df176bb94594f0d43b0e027f027a8d7cf8978fdb819024a
+checksum=ca59760bc274a899a0da75809d6909ae43e5123381fd6ef040a44d1952c0b448
+make_check_pre="env PYTHONPATH=src"

From 40316f15932a5a3702fa879ffc11310a510a4b51 Mon Sep 17 00:00:00 2001
From: Joel Beckmeyer <joel@beckmeyer.us>
Date: Mon, 26 Sep 2022 12:59:32 -0400
Subject: [PATCH 3/5] python3-phonenumbers: update to 8.12.56.

---
 srcpkgs/python3-phonenumbers/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/python3-phonenumbers/template b/srcpkgs/python3-phonenumbers/template
index c18abcc9ee38..23de86a72eb4 100644
--- a/srcpkgs/python3-phonenumbers/template
+++ b/srcpkgs/python3-phonenumbers/template
@@ -1,6 +1,6 @@
 # Template file for 'python3-phonenumbers'
 pkgname=python3-phonenumbers
-version=8.12.55
+version=8.12.56
 revision=1
 wrksrc="phonenumbers-${version}"
 build_style=python3-module
@@ -12,4 +12,4 @@ license="Apache-2.0"
 homepage="https://github.com/daviddrysdale/python-phonenumbers"
 changelog="https://raw.githubusercontent.com/daviddrysdale/python-phonenumbers/dev/python/HISTORY.md"
 distfiles="${PYPI_SITE}/p/phonenumbers/phonenumbers-${version}.tar.gz"
-checksum=1be3c7353e9325ddeaa909ab17936423c62958d5700d68e5da5be9503c46d087
+checksum=82a4f226c930d02dcdf6d4b29e4cfd8678991fe65c2efd5fdd143557186f0868

From 18c06ac15c63f457bd9650a742720ff82a780eb2 Mon Sep 17 00:00:00 2001
From: Joel Beckmeyer <joel@beckmeyer.us>
Date: Thu, 22 Sep 2022 08:55:24 -0400
Subject: [PATCH 4/5] python3-matrix-common: update to 1.3.0.

---
 srcpkgs/python3-matrix-common/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/python3-matrix-common/template b/srcpkgs/python3-matrix-common/template
index 4ed002f4d2e6..0f71657b1a53 100644
--- a/srcpkgs/python3-matrix-common/template
+++ b/srcpkgs/python3-matrix-common/template
@@ -1,6 +1,6 @@
 # Template file for 'python3-matrix-common'
 pkgname=python3-matrix-common
-version=1.2.1
+version=1.3.0
 revision=1
 wrksrc="matrix-python-common-${version}"
 build_style=python3-pep517
@@ -11,5 +11,5 @@ maintainer="Joel Beckmeyer <joel@beckmeyer.us>"
 license="Apache-2.0"
 homepage="https://github.com/matrix-org/matrix-python-common"
 distfiles="https://github.com/matrix-org/matrix-python-common/archive/v${version}.tar.gz"
-checksum=75ccb0de5b5cd551d81770addea1d2b227831f9cb83d46079ee0c74af0fb0a69
+checksum=9792a69b04904cb2da027890fe07229cc6610254268d2a5037e31aaeb7047104
 make_check=no # requires unpackaged python3 module aiounittest

From 2c6ec8c6249ee5f6b5326dcaca5adb48c01799a8 Mon Sep 17 00:00:00 2001
From: Joel Beckmeyer <joel@beckmeyer.us>
Date: Tue, 20 Sep 2022 14:16:45 -0400
Subject: [PATCH 5/5] synapse: update to 1.68.0, fix tests.

---
 srcpkgs/synapse/template | 22 ++++++++++++++++++----
 1 file changed, 18 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/synapse/template b/srcpkgs/synapse/template
index 307d3d08ade8..51ae6d8eb47d 100644
--- a/srcpkgs/synapse/template
+++ b/srcpkgs/synapse/template
@@ -1,11 +1,12 @@
 # Template file for 'synapse'
 pkgname=synapse
-version=1.67.0
+version=1.68.0
 revision=1
 build_style=python3-pep517
+build_helper=rust
 make_check_target=tests
 make_install_target="matrix_synapse-${version}-*-*-*.whl"
-hostmakedepends="python3-poetry-core"
+hostmakedepends="python3-poetry-core python3-setuptools-rust cargo"
 depends="python3-jsonschema python3-frozendict python3-canonicaljson
  python3-signedjson python3-pynacl python3-service_identity python3-Twisted
  python3-openssl python3-yaml python3-pyasn1 python3-pyasn1-modules
@@ -22,7 +23,11 @@ license="Apache-2.0"
 homepage="https://github.com/matrix-org/synapse"
 changelog="https://raw.githubusercontent.com/matrix-org/synapse/develop/CHANGES.md"
 distfiles="https://github.com/matrix-org/synapse/archive/v${version}.tar.gz"
-checksum=85eeb24890c4b8e68f1e5ca4d5e69e1eb49e67cc33c450dc7c1fe7e70c023c68
+checksum=3da9f788530905abc1c5db02f0cb2afd01b65463fe6962f1c4394ac153aad8ac
+
+if [ "$CROSS_BUILD" ]; then
+	makedepends+=" rust-std"
+fi
 
 system_accounts="synapse"
 synapse_homedir="/var/lib/synapse"
@@ -32,12 +37,21 @@ make_dirs="
 	/etc/synapse 755 synapse synapse
 	/var/log/synapse 0755 synapse synapse"
 
+post_patch() {
+	vsed -i '/^setuptools_rust/d' pyproject.toml
+}
+
 pre_check() {
 	unzip ${make_install_target} "*.dist-info/*"
+	[ -d build/lib* ] && cp -r tests build/lib*
 }
 
 do_check() {
-	PYTHONPATH="." trial3 ${makejobs} tests
+	PYTHONPATH="$(cd build/lib* && pwd):." trial3 ${makejobs} tests
+}
+
+post_check() {
+	rm -r build/lib*/tests
 }
 
 post_install() {

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PR PATCH] [Closed]: synapse: update to 1.68.0.
  2022-09-22 14:20 [PR PATCH] [WIP] synapse: update to 1.68.0rc1. New package: python3-setuptools_rust-1.5.2 TinfoilSubmarine
                   ` (20 preceding siblings ...)
  2022-09-27 12:44 ` [PR PATCH] [Updated] " TinfoilSubmarine
@ 2022-09-28 14:41 ` ahesford
  21 siblings, 0 replies; 23+ messages in thread
From: ahesford @ 2022-09-28 14:41 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1270 bytes --]

There's a closed pull request on the void-packages repository

synapse: update to 1.68.0.
https://github.com/void-linux/void-packages/pull/39416

Description:
build-style/python3-*.sh might need more adjusting for this, I already spotted
one problem where rustc consumes the TMPDIR environment variable and breaks the
build process.

<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


^ permalink raw reply	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2022-09-28 14:41 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-22 14:20 [PR PATCH] [WIP] synapse: update to 1.68.0rc1. New package: python3-setuptools_rust-1.5.2 TinfoilSubmarine
2022-09-22 14:21 ` ahesford
2022-09-22 14:21 ` [PR PATCH] [Updated] " TinfoilSubmarine
2022-09-22 14:23 ` TinfoilSubmarine
2022-09-22 14:26 ` [WIP] synapse: update to 1.68.0rc1 ahesford
2022-09-22 14:28 ` TinfoilSubmarine
2022-09-22 14:30 ` [PR PATCH] [Updated] " TinfoilSubmarine
2022-09-22 14:37 ` TinfoilSubmarine
2022-09-23 12:12 ` [PR PATCH] [Updated] " TinfoilSubmarine
2022-09-23 12:40 ` [PR PATCH] [Updated] [WIP] synapse: update to 1.68.0rc2 TinfoilSubmarine
2022-09-26 14:55 ` TinfoilSubmarine
2022-09-26 14:56 ` [PR REVIEW] " ahesford
2022-09-26 14:56 ` ahesford
2022-09-26 14:56 ` ahesford
2022-09-26 14:56 ` ahesford
2022-09-26 14:56 ` ahesford
2022-09-26 14:56 ` ahesford
2022-09-26 15:49 ` TinfoilSubmarine
2022-09-26 16:07 ` ahesford
2022-09-26 16:27 ` [PR PATCH] [Updated] " TinfoilSubmarine
2022-09-26 16:38 ` [PR REVIEW] " TinfoilSubmarine
2022-09-27 12:44 ` [PR PATCH] [Updated] " TinfoilSubmarine
2022-09-28 14:41 ` [PR PATCH] [Closed]: synapse: update to 1.68.0 ahesford

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).