Skip to content
GitLab
Menu
Why GitLab
Pricing
Contact Sales
Explore
Why GitLab
Pricing
Contact Sales
Explore
Sign in
Get free trial
Primary navigation
Search or go to…
Project
F
FreeBSD ports
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Privacy statement
Keyboard shortcuts
?
What's new
6
Snippets
Groups
Projects
Show more breadcrumbs
FreeBSD
FreeBSD ports
Commits
7a5f12ca
Verified
Commit
7a5f12ca
authored
2 weeks ago
by
Charlie Li
Browse files
Options
Downloads
Patches
Plain Diff
databases/py-gdbm: convert to USE_PYTHON=pep517
PR: 268283
parent
c80aa929
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
databases/py-gdbm/Makefile
+20
-7
20 additions, 7 deletions
databases/py-gdbm/Makefile
databases/py-gdbm/files/pyproject.toml.in
+11
-0
11 additions, 0 deletions
databases/py-gdbm/files/pyproject.toml.in
databases/py-gdbm/files/setup.py
+4
-17
4 additions, 17 deletions
databases/py-gdbm/files/setup.py
with
35 additions
and
24 deletions
databases/py-gdbm/Makefile
+
20
−
7
View file @
7a5f12ca
PORTNAME
=
gdbm
DISTVERSION
=
${
PYTHON_DISTVERSION
}
PORTREVISION
=
8
PORTREVISION
=
9
CATEGORIES
=
databases python
MASTER_SITES
=
PYTHON/ftp/python/
${
DISTVERSION
}
PKGNAMEPREFIX
=
${
PYTHON_PKGNAMEPREFIX
}
...
...
@@ -11,22 +11,35 @@ MAINTAINER= python@FreeBSD.org
COMMENT
=
Python bindings to the GNU dbm library
(
Python
${
PYTHON_VER
}
)
LICENSE
=
PSFL
LICENSE_FILE
=
${
WRKDIR
}
/Python-
${
DISTVERSION
}
/LICENSE
BUILD_DEPENDS
=
${
PYTHON_PKGNAMEPREFIX
}
setuptools>0:devel/py-setuptools@
${
PY_FLAVOR
}
\
${
PYTHON_PKGNAMEPREFIX
}
wheel>0:devel/py-wheel@
${
PY_FLAVOR
}
LIB_DEPENDS
=
libgdbm.so:databases/gdbm
USES
=
compiler:c11 python
tar
:xz
USE_PYTHON
=
allflavors autoplist
distutils
USE_PYTHON
=
allflavors autoplist
pep517
DISTINFO_FILE
=
${
.CURDIR
}
/../../lang/python
${
PYTHON_SUFFIX
}
/distinfo
PYDISTUTILS_INSTALLARGS
+=
--install-lib
${
PYTHONPREFIX_LIBDIR
}
/lib-dynload
DISTINFO_FILE
=
${
PORTSDIR
}
/lang/python
${
PYTHON_SUFFIX
}
/distinfo
WRKSRC_SUBDIR
=
Modules
SUB_LIST
+=
DISTVERSION
=
${
DISTVERSION
}
SUB_FILES
=
pyproject.toml
PLIST_FILES
=
${
PYTHONPREFIX_LIBDIR:S
;${
PREFIX
}
/
;;}
/lib-dynload/_gdbm
${
PYTHON_EXT_SUFFIX
}
.so
PORTSCOUT
=
ignore:1
post-extract
:
@${
CP
}
${
FILESDIR
}
/setup.py
${
WRKSRC
}
/setup.py
pre-configure
:
@${
CP
}
${
FILESDIR
}
/setup.py
${
WRKSRC
}
@${
MV
}
${
WRKDIR
}
/pyproject.toml
${
WRKSRC
}
post-install
:
${
STRIP_CMD
}
${
STAGEDIR
}${
PYTHON_LIBDIR
}
/lib-dynload/_gdbm.cpython-
${
PYTHON_SUFFIX
}
.so
@${
STRIP_CMD
}
${
STAGEDIR
}${
PYTHONPREFIX_SITELIBDIR
}
/_gdbm
${
PYTHON_EXT_SUFFIX
}
.so
# lib-dynload is the expected location
@${
MKDIR
}
${
STAGEDIR
}${
PYTHONPREFIX_LIBDIR
}
/lib-dynload
@
(
cd
${
STAGEDIR
}${
PYTHONPREFIX_LIBDIR
}
/lib-dynload
&&
${
LN
}
-s
../site-packages/_gdbm
${
PYTHON_EXT_SUFFIX
}
.so
)
do-test
:
@${
PYTHON_CMD
}
-c
'import dbm'
# minimal smoke test
.
include
<bsd.port.mk>
This diff is collapsed.
Click to expand it.
databases/py-gdbm/files/pyproject.toml.in
0 → 100644
+
11
−
0
View file @
7a5f12ca
[build-system]
requires = ["setuptools", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "gdbm"
version = "%%DISTVERSION%%"
description = "GNU dbm extension to Python"
[tool.setuptools]
packages = []
This diff is collapsed.
Click to expand it.
databases/py-gdbm/files/setup.py
+
4
−
17
View file @
7a5f12ca
#!/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
"
)
import
sysconfig
from
setuptools
import
setup
,
Extension
install
.
sub_commands
=
[
x
for
x
in
install
.
sub_commands
if
'
egg
'
not
in
x
[
0
]]
prefix
=
sysconfig
.
PREFIX
prefix
=
sysconfig
.
get_config_var
(
'
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
'
],
setup
(
ext_modules
=
[
Extension
(
'
_gdbm
'
,
[
'
_gdbmmodule.c
'
],
include_dirs
=
inc_dirs
,
libraries
=
libs
,
library_dirs
=
lib_dirs
)]
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment