-
-
Notifications
You must be signed in to change notification settings - Fork 14.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
python312Packages.python-mapnik: drop nose dependency #330432
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It’s not clear if this is running all the tests, cf. https://github.com/mapnik/python-mapnik/blob/248003c9da0de1ec7996cebd007c982f9875f2a3/test/run_tests.py#L10-L20. Upstream was apparently in the process of moving to pytest: mapnik/python-mapnik#264. It looks like there’s only this one file referencing nose now, but I don’t feel extremely confident here. It does look like a bunch of tests are still running, so maybe it’s just an irrelevant test runner?
@dotlambda You commented on the upstream issue; do you know what’s going on here?
Would be good to bump the version and migrate to pyproject = true;
.
To me it seems that |
Yeah, it seems like it’s probably fine. I don’t know if the doctests are running or not but it’s not a big deal. Could you move to |
sure, give me a couple minutes |
Updating to lateset commit seems to cause trouble with the patches:
|
The |
Using the following changes: diff --git a/pkgs/development/python-modules/python-mapnik/default.nix b/pkgs/development/python-modules/python-mapnik/default.nix
index e74607e83a48..3f6987a4208e 100644
--- a/pkgs/development/python-modules/python-mapnik/default.nix
+++ b/pkgs/development/python-modules/python-mapnik/default.nix
@@ -5,6 +5,7 @@
substituteAll,
isPyPy,
python,
+ setuptools,
pillow,
pycairo,
pkg-config,
@@ -24,18 +25,19 @@
pytestCheckHook,
darwin,
sparsehash,
+ pybind11
}:
buildPythonPackage rec {
pname = "python-mapnik";
version = "3.0.16-unstable-2024-02-22";
- format = "setuptools";
+ pyproject = true;
src = fetchFromGitHub {
owner = "mapnik";
repo = "python-mapnik";
- rev = "5ab32f0209909cc98c26e1d86ce0c8ef29a9bf3d";
- hash = "sha256-OqijA1WcyBcyWO8gntqp+xNIaV1Jqa0n1eMDip2OCvY=";
+ rev = "248003c9da0de1ec7996cebd007c982f9875f2a3";
+ hash = "sha256-CsEy0BoV3OuSTtJiv22+d0YueaNV/Llfvtx3hEqsFpI=";
# Only needed for test data
fetchSubmodules = true;
};
@@ -47,19 +49,18 @@ buildPythonPackage rec {
src = ./find-libmapnik.patch;
libmapnik = "${mapnik}/lib";
})
- # Use `std::optional` rather than `boost::optional`
- # https://github.com/mapnik/python-mapnik/commit/e9f88a95a03dc081826a69da67bbec3e4cccd5eb
- ./python-mapnik_std_optional.patch
];
stdenv = if python.stdenv.isDarwin then darwin.apple_sdk_11_0.stdenv else python.stdenv;
+ build-system = [ setuptools ];
+
nativeBuildInputs = [
mapnik # for mapnik_config
pkg-config
];
- buildInputs = [
+ dependencies = [
mapnik
boost
cairo
@@ -74,6 +75,7 @@ buildPythonPackage rec {
libxml2
sqlite
sparsehash
+ pybind11
];
propagatedBuildInputs = [
diff --git a/pkgs/development/python-modules/python-mapnik/find-libmapnik.patch b/pkgs/development/python-modules/python-mapnik/find-libmapnik.patch
index cec557a2940a..ca8f7e94d972 100644
--- a/pkgs/development/python-modules/python-mapnik/find-libmapnik.patch
+++ b/pkgs/development/python-modules/python-mapnik/find-libmapnik.patch
@@ -14,17 +14,17 @@ index 0f94826b6..3cceb4546 100644
if 'uninstall' not in COMMAND_LINE_TARGETS:
pymapniklib = env.Install(target_path,_mapnik)
diff --git a/setup.py b/setup.py
-index 9985da5a2..5a03a1ec8 100755
+index 9b73f0139..c9d14d98a 100755
--- a/setup.py
+++ b/setup.py
-@@ -118,8 +118,8 @@ linkflags.extend(check_output([mapnik_config, '--libs']).split(' '))
+@@ -18,8 +18,8 @@ linkflags.extend(check_output([mapnik_config, '--libs']).split(' '))
linkflags.extend(check_output([mapnik_config, '--ldflags']).split(' '))
linkflags.extend(check_output([mapnik_config, '--dep-libs']).split(' '))
linkflags.extend([
--'-lmapnik-wkt',
--'-lmapnik-json',
-+'-lmapnikwkt',
-+'-lmapnikjson',
- ] + ['-l%s' % i for i in get_boost_library_names()])
+- '-lmapnik-wkt',
+- '-lmapnik-json',
++ '-lmapnikwkt',
++ '-lmapnikjson',
+ ])
# Dynamically make the mapnik/paths.py file I get the following compile error:
|
Okay, I guess there’s some incompatibility with Mapnik or something going on here; not worth the effort to figure out now. It’s okay to just migrate over to |
9a44bca
to
82b91bc
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Result of nixpkgs-review pr 330432
run on x86_64-linux 1
5 packages built:
- nixpkgs-manual
- python311Packages.python-mapnik
- python311Packages.python-mapnik.dist
- python312Packages.python-mapnik
- python312Packages.python-mapnik.dist
Description of changes
Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)Add a 👍 reaction to pull requests you find important.