[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 12:02:09 BST 2024



Michael R. Crusoe pushed to branch debian/experimental at Debian Python Team / packages / mypy


Commits:
4dd3bbaf by Michael R. Crusoe at 2024-08-15T13:01:17+02:00
googletest fixes

- - - - -
dd16af24 by Michael R. Crusoe at 2024-08-15T13:01:17+02:00
mypyc doc fix

- - - - -


7 changed files:

- debian/clean
- debian/control
- debian/mypy-doc.docs
- + debian/patches/external_googletest
- debian/patches/series
- debian/rules
- debian/tests/control


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>,
@@ -32,7 +32,8 @@ Build-Depends: debhelper-compat (= 13),
                cython-doc <!nodoc>,
                python-six-doc <!nodoc>,
                python-setuptools-doc <!nodoc>,
-               python-attr-doc <!nodoc>
+               python-attr-doc <!nodoc>,
+               pkgconf <!nocheck>
 Standards-Version: 4.6.2
 Vcs-Browser: https://salsa.debian.org/python-team/packages/mypy
 Vcs-Git: https://salsa.debian.org/python-team/packages/mypy.git


=====================================
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
 
 


=====================================
debian/tests/control
=====================================
@@ -8,5 +8,6 @@ Depends: gcc,
          python3-setuptools,
          python3-tomli,
          python3-typeshed (>= 0.0~git20221107.4f381af),
-         python3-virtualenv
+         python3-virtualenv,
+         pkgconf
 Restrictions: allow-stderr



View it on GitLab: https://salsa.debian.org/python-team/packages/mypy/-/compare/24802e4f724117c0b0b434448db6d5c35bc419dd...dd16af246ec69a4bc33a3a0b71cccb6a2dd3ab35

-- 
View it on GitLab: https://salsa.debian.org/python-team/packages/mypy/-/compare/24802e4f724117c0b0b434448db6d5c35bc419dd...dd16af246ec69a4bc33a3a0b71cccb6a2dd3ab35
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/0953aa89/attachment-0001.htm>


More information about the debian-med-commit mailing list