mirror of
https://git.freebsd.org/ports.git
synced 2025-07-17 17:29:23 -04:00
- Fix building with python3*
- Use checksum file under lang/python${PYTHON_SUFFIX}/, for removal lang/python/distinfo PR: ports/136199 Submitted by: lwhsu Approved by: perky
This commit is contained in:
parent
b50a93688f
commit
979f0ac6fb
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=237415
2 changed files with 36 additions and 2 deletions
|
@ -24,9 +24,15 @@ USE_PYTHON= yes
|
|||
USE_PYDISTUTILS=yes
|
||||
PYDISTUTILS_PKGVERSION= 0.0.0
|
||||
WRKSRC= ${PYTHON_WRKSRC}/Modules
|
||||
MD5_FILE= ${PORTSDIR}/lang/python/distinfo
|
||||
MD5_FILE= ${PORTSDIR}/lang/python${PYTHON_SUFFIX}/distinfo
|
||||
|
||||
.include <bsd.port.pre.mk>
|
||||
|
||||
post-extract:
|
||||
.if ${PYTHON_REL} < 300
|
||||
@${CP} ${FILESDIR}/setup.py ${WRKSRC}
|
||||
.else
|
||||
@${CP} ${FILESDIR}/setup3.py ${WRKSRC}/setup.py
|
||||
.endif
|
||||
|
||||
.include <bsd.port.mk>
|
||||
.include <bsd.port.post.mk>
|
||||
|
|
28
databases/py-gdbm/files/setup3.py
Normal file
28
databases/py-gdbm/files/setup3.py
Normal file
|
@ -0,0 +1,28 @@
|
|||
#!/usr/bin/env python
|
||||
# To use:
|
||||
# python setup.py install
|
||||
#
|
||||
|
||||
__version__ = "$FreeBSD$"
|
||||
|
||||
try:
|
||||
import distutils
|
||||
from distutils import sysconfig
|
||||
from distutils.command.install import install
|
||||
from distutils.core import setup, Extension
|
||||
except:
|
||||
raise SystemExit("Distutils problem")
|
||||
|
||||
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)]
|
||||
)
|
Loading…
Add table
Reference in a new issue