git: af2d42e1748e - main - databases/py-gdbm: Strip shared library
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 09 Jul 2023 10:45:51 UTC
The branch main has been updated by sunpoet: URL: https://cgit.FreeBSD.org/ports/commit/?id=af2d42e1748eff3bd8627faa4f21fccd4998bb63 commit af2d42e1748eff3bd8627faa4f21fccd4998bb63 Author: Po-Chuan Hsieh <sunpoet@FreeBSD.org> AuthorDate: 2023-07-09 10:28:19 +0000 Commit: Po-Chuan Hsieh <sunpoet@FreeBSD.org> CommitDate: 2023-07-09 10:28:19 +0000 databases/py-gdbm: Strip shared library - Clean up - Bump PORTREVISION for package change --- databases/py-gdbm/Makefile | 18 ++++++++++-------- databases/py-gdbm/files/setup.py | 7 +++---- databases/py-gdbm/files/setup3.py | 28 ---------------------------- 3 files changed, 13 insertions(+), 40 deletions(-) diff --git a/databases/py-gdbm/Makefile b/databases/py-gdbm/Makefile index cc7bf5a7148c..17034fe06914 100644 --- a/databases/py-gdbm/Makefile +++ b/databases/py-gdbm/Makefile @@ -1,10 +1,11 @@ PORTNAME= gdbm DISTVERSION= ${PYTHON_DISTVERSION} -PORTREVISION= 6 +PORTREVISION= 7 CATEGORIES= databases python MASTER_SITES= PYTHON/ftp/python/${DISTVERSION} PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} DISTNAME= Python-${DISTVERSION} +DIST_SUBDIR= python MAINTAINER= python@FreeBSD.org COMMENT= Python bindings to the GNU dbm library (Python ${PYTHON_VER}) @@ -13,18 +14,19 @@ LICENSE= PSFL LIB_DEPENDS= libgdbm.so:databases/gdbm -PORTSCOUT= ignore:1 - USES= compiler:c11 python tar:xz -USE_PYTHON= distutils autoplist allflavors +USE_PYTHON= allflavors autoplist distutils +DISTINFO_FILE= ${.CURDIR}/../../lang/python${PYTHON_SUFFIX}/distinfo PYDISTUTILS_INSTALLARGS+= --install-lib ${PYTHONPREFIX_LIBDIR}/lib-dynload - -DIST_SUBDIR= python -DISTINFO_FILE= ${PORTSDIR}/lang/python${PYTHON_SUFFIX}/distinfo WRKSRC_SUBDIR= Modules +PORTSCOUT= ignore:1 + post-extract: - @${CP} ${FILESDIR}/setup3.py ${WRKSRC}/setup.py + @${CP} ${FILESDIR}/setup.py ${WRKSRC}/setup.py + +post-install: + ${STRIP_CMD} ${STAGEDIR}${PYTHON_LIBDIR}/lib-dynload/_gdbm.cpython-${PYTHON_SUFFIX}.so .include <bsd.port.mk> diff --git a/databases/py-gdbm/files/setup.py b/databases/py-gdbm/files/setup.py index 9acb68c35da1..0a947466d03e 100644 --- a/databases/py-gdbm/files/setup.py +++ b/databases/py-gdbm/files/setup.py @@ -9,10 +9,9 @@ try: from distutils.command.install import install from distutils.core import setup, Extension except: - raise SystemExit, "Distutils problem" + raise SystemExit("Distutils problem") -install.sub_commands = filter(lambda (cmd, avl): 'egg' not in cmd, - install.sub_commands) +install.sub_commands = [x for x in install.sub_commands if 'egg' not in x[0]] prefix = sysconfig.PREFIX inc_dirs = [prefix + "/include"] @@ -22,7 +21,7 @@ libs = ["gdbm"] setup(name = "gdbm", description = "GDBM Extension to Python", - ext_modules = [Extension('gdbm', ['gdbmmodule.c'], + ext_modules = [Extension('_gdbm', ['_gdbmmodule.c'], include_dirs = inc_dirs, libraries = libs, library_dirs = lib_dirs)] diff --git a/databases/py-gdbm/files/setup3.py b/databases/py-gdbm/files/setup3.py deleted file mode 100644 index 0a947466d03e..000000000000 --- a/databases/py-gdbm/files/setup3.py +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env python -# To use: -# python setup.py install -# - -try: - import distutils - from distutils import sysconfig - from distutils.command.install import install - from distutils.core import setup, Extension -except: - raise SystemExit("Distutils problem") - -install.sub_commands = [x for x in install.sub_commands if 'egg' not in x[0]] - -prefix = sysconfig.PREFIX -inc_dirs = [prefix + "/include"] -lib_dirs = [prefix + "/lib"] -libs = ["gdbm"] - -setup(name = "gdbm", - description = "GDBM Extension to Python", - - ext_modules = [Extension('_gdbm', ['_gdbmmodule.c'], - include_dirs = inc_dirs, - libraries = libs, - library_dirs = lib_dirs)] - )