[med-svn] [Git][python-team/packages/mypy][debian/experimental] 2 commits: googletest fixes
Michael R. Crusoe (@crusoe)
gitlab at salsa.debian.org
Thu Aug 15 11:49:39 BST 2024
Michael R. Crusoe pushed to branch debian/experimental at Debian Python Team / packages / mypy
Commits:
bff388fc by Michael R. Crusoe at 2024-08-15T12:49:13+02:00
googletest fixes
- - - - -
24802e4f by Michael R. Crusoe at 2024-08-15T12:49:14+02:00
mypyc doc fix
- - - - -
6 changed files:
- debian/clean
- debian/control
- debian/mypy-doc.docs
- + debian/patches/external_googletest
- debian/patches/series
- debian/rules
Changes:
=====================================
debian/clean
=====================================
@@ -4,8 +4,6 @@ extensions/mypy_extensions.egg-info/
docs/build/
mypy/__pycache__/
mypyc/lib-rt/build/
-mypyc/external/googletest/make/*.o
-mypyc/external/googletest/make/*.a
mypyc/lib-rt/*.so
test-data/packages/typedpkg/build/
test-data/packages/typedpkg/dist/
=====================================
debian/control
=====================================
@@ -10,7 +10,7 @@ Build-Depends: debhelper-compat (= 13),
pybuild-plugin-pyproject,
python3-wheel,
flake8,
- help2man,
+ libgtest-dev,
python3-all,
python3-lxml,
python3-attr <!nocheck>,
=====================================
debian/mypy-doc.docs
=====================================
@@ -1,2 +1,2 @@
docs/build/html
-mypyc/docs/build/mypyc
+mypyc/doc/_build/mypyc
=====================================
debian/patches/external_googletest
=====================================
@@ -0,0 +1,51 @@
+Author: Michael R. Crusoe <crusoe at debian.org>
+Description: Use the packaged version of googletest
+Forwarded: not-needed
+
+Not the code copy we stripped out of upstream's sources
+
+--- mypy.orig/mypyc/lib-rt/setup.py
++++ mypy/mypyc/lib-rt/setup.py
+@@ -5,7 +5,6 @@
+
+ from __future__ import annotations
+
+-import os
+ import subprocess
+ import sys
+ from distutils.command.build_ext import build_ext
+@@ -26,20 +25,8 @@
+ return ["gtest"]
+
+ def run(self):
+- gtest_dir = os.path.abspath(
+- os.path.join(os.path.dirname(__file__), "..", "external", "googletest")
+- )
+-
+- os.makedirs(self.build_temp, exist_ok=True)
+-
+- # Build Google Test, the C++ framework we use for testing C code.
+- # The source code for Google Test is copied to this repository.
+- subprocess.check_call(
+- ["make", "-f", os.path.join(gtest_dir, "make", "Makefile"), f"GTEST_DIR={gtest_dir}"],
+- cwd=self.build_temp,
+- )
+-
+- self.library_dirs = [self.build_temp]
++ self.library_dirs = [
++ subprocess.run(["pkgconf", "gtest", "--variable=libdir"]).stdout]
+
+ return build_ext.run(self)
+
+@@ -63,7 +50,10 @@
+ depends=["CPy.h", "mypyc_util.h", "pythonsupport.h"],
+ extra_compile_args=["-Wno-unused-function", "-Wno-sign-compare"] + compile_args,
+ libraries=["gtest"],
+- include_dirs=["../external/googletest", "../external/googletest/include"],
++ include_dirs=[
++ "/usr/src/googletest/googletest",
++ "/usr/src/googletest/googletest/include"
++ ],
+ **kwargs,
+ )
+ ],
=====================================
debian/patches/series
=====================================
@@ -1,3 +1,4 @@
+external_googletest
hint-typeshed-package
verbose
intersphinx
=====================================
debian/rules
=====================================
@@ -50,8 +50,8 @@ override_dh_auto_build-indep: manpages
MYPY_USE_MYPYC=0 dh_auto_build
ifeq (,$(filter nodoc,$(DEB_BUILD_PROFILES)))
PYTHONPATH=$(CURDIR) $(MAKE) -C docs html
- PYTHONPATH=$(CURDIR) $(MAKE) -C mypyc/docs html
- mv mypyc/docs/build/html mypyc/docs/build/mypyc
+ PYTHONPATH=$(CURDIR) $(MAKE) -C mypyc/doc html
+ mv mypyc/doc/_build/html mypyc/doc/_build/mypyc
endif
View it on GitLab: https://salsa.debian.org/python-team/packages/mypy/-/compare/140cea23083234d50023535e380bea676d63d8b3...24802e4f724117c0b0b434448db6d5c35bc419dd
--
View it on GitLab: https://salsa.debian.org/python-team/packages/mypy/-/compare/140cea23083234d50023535e380bea676d63d8b3...24802e4f724117c0b0b434448db6d5c35bc419dd
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20240815/fd5f1fb7/attachment-0001.htm>
More information about the debian-med-commit
mailing list