Skip to content

Commit

Permalink
dev-python/pymssql: Skip problematic configure check
Browse files Browse the repository at this point in the history
Closes: https://bugs.gentoo.org/783396
Signed-off-by: Michał Górny <[email protected]>
  • Loading branch information
mgorny committed Apr 17, 2021
1 parent bf0eeaf commit 21aaae1
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
27 changes: 27 additions & 0 deletions dev-python/pymssql/files/pymssql-2.2.1-clock_gettime.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
From d130cacf5be53b4c15bb64787d82b1225b1485e7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <[email protected]>
Date: Sat, 17 Apr 2021 13:10:34 +0200
Subject: [PATCH] Check for clock_gettime() only when linking statically

The extension module does not use clock_gettime() directly, so I presume
it is only necessary when linking statically to FreeTDS.
---
setup.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/setup.py b/setup.py
index 3ac434e..0295d01 100644
--- a/setup.py
+++ b/setup.py
@@ -95,7 +95,7 @@ if not WINDOWS:
print("setup.py: include_dirs =>", include_dirs)
print("setup.py: library_dirs =>", library_dirs)

-if not WINDOWS:
+if LINK_FREETDS_STATICALLY and not WINDOWS:
# check for clock_gettime, link with librt for glibc<2.17
from dev import ccompiler
compiler = ccompiler.new_compiler()
--
2.31.1

8 changes: 8 additions & 0 deletions dev-python/pymssql/pymssql-2.2.1.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,12 @@ BDEPEND="
dev-python/sqlalchemy[${PYTHON_USEDEP}]
)"

PATCHES=(
"${FILESDIR}"/${P}-clock_gettime.patch
)

distutils_enable_tests pytest

src_configure() {
export LINK_FREETDS_STATICALLY=no
}

0 comments on commit 21aaae1

Please sign in to comment.