Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
libmtime
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
icon-libraries
libmtime
Commits
9f08091d
Commit
9f08091d
authored
8 months ago
by
Sergey Kosukhin
Browse files
Options
Downloads
Patches
Plain Diff
Build Python extension as a separate module
parent
e63264e5
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!43
Update python build
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
.gitignore
+1
-0
1 addition, 0 deletions
.gitignore
configure.ac
+6
-6
6 additions, 6 deletions
configure.ac
python/Makefile.am
+14
-1
14 additions, 1 deletion
python/Makefile.am
python/mtime/libmtime.py
+3
-8
3 additions, 8 deletions
python/mtime/libmtime.py
with
24 additions
and
15 deletions
.gitignore
+
1
−
0
View file @
9f08091d
...
...
@@ -68,6 +68,7 @@ libtool
/**/examples/test_dace
/**/examples/test_jd_logic
/**/examples/uniq
/**/python/mtime/.dirstamp
__pycache__/
# Documentation stage files
...
...
This diff is collapsed.
Click to expand it.
configure.ac
+
6
−
6
View file @
9f08091d
...
...
@@ -37,9 +37,9 @@ AS_VAR_IF([ac_cv_prog_cc_c99], [no],
AC_PROG_FC
ACX_USE_LIBTOOL_CONFIGURATION([pic-only])
dnl Get extension of
the
dynamic
libraries
from Libtool:
{ module=
no
; eval acx_
shr
ext=\"$shrext_cmds\"; unset module;}
AC_SUBST([acx_
shr
ext])dnl
dnl Get extension of
a
dynamic
ally loaded module file
from Libtool:
{ module=
yes
; eval acx_
mod
ext=\"$shrext_cmds\"; unset module;}
AC_SUBST([acx_
mod
ext])dnl
AC_LANG_PUSH([Fortran])
dnl Automake does not trace AC_FC_PP_SRCEXT/ACX_FC_PP_SRCEXT and therefore
...
...
@@ -74,12 +74,12 @@ AC_ARG_ENABLE([python],
[AS_HELP_STRING([--enable-python],
[enable the Python interface @<:@default=auto@:>@])], [],
[enable_python=auto])
AS_
VAR_
IF([enable_shared
], [
no],
AS_IF([
test "x$
enable_shared
" = xno || test "x$with_pic" = x
no],
[AS_CASE([$enable_python],
[auto], [enable_python=no],
[no], [],
[AC_MSG_ERROR([cannot provide the Python interface when the shared libraries dnl
are disabled])])])
or PIC objects
are disabled])])])
AC_ARG_ENABLE([check],
[AS_HELP_STRING([--enable-check],
...
...
@@ -157,7 +157,7 @@ AC_CONFIG_FILES([
test/test_python.sh
], [chmod a+x "$ac_file"])
AS_VAR_IF([enable_
shared
], [yes],
AS_VAR_IF([enable_
python
], [yes],
[AC_CONFIG_LINKS([
python/mtime/__init__.py:python/mtime/__init__.py
python/mtime/libmtime.py:python/mtime/libmtime.py
...
...
This diff is collapsed.
Click to expand it.
python/Makefile.am
+
14
−
1
View file @
9f08091d
...
...
@@ -6,9 +6,22 @@ install_tmpdir = mtime/.install
pkgpython_PYTHON
=
mtime/__init__.py
nodist_pkgpython_PYTHON
=
$(
install_tmpdir
)
/libmtime.py
pkgpyexec_LTLIBRARIES
=
mtime/mtime.la
mtime_mtime_la_SOURCES
=
mtime_mtime_la_LDFLAGS
=
-shared
-avoid-version
-module
mtime_mtime_la_LIBADD
=
$(
top_builddir
)
/src/libmtime_c.la
$(install_tmpdir)/libmtime.py
:
mtime/libmtime.py
$(
MKDIR_P
)
$(
@D
)
&&
sed
"s,^SOFILE = None
$$
,SOFILE = '
$(
DESTDIR
)$(
lib
dir
)
/
lib
mtime
$(
acx_
shr
ext
)
',"
$<
>
$@
$(
MKDIR_P
)
$(
@D
)
&&
sed
"s,^SOFILE = None
$$
,SOFILE = '
$(
DESTDIR
)$(
pkgpyexec
dir
)
/mtime
$(
acx_
mod
ext
)
',"
$<
>
$@
install-data-hook
:
rm
-rf
$(
install_tmpdir
)
# overrides to make regular compilations also use libtool
COMPILE
=
$(
LIBTOOL
)
$(
AM_V_lt
)
--tag
=
CC
$(
AM_LIBTOOLFLAGS
)
\
$(
LIBTOOLFLAGS
)
--mode
=
compile
$(
CC
)
-static
$(
DEFS
)
\
$(
DEFAULT_INCLUDES
)
$(
INCLUDES
)
$(
AM_CPPFLAGS
)
$(
CPPFLAGS
)
\
$(
AM_CFLAGS
)
$(
CFLAGS
)
FCCOMPILE
=
$(
LIBTOOL
)
$(
AM_V_lt
)
--tag
=
FC
$(
AM_LIBTOOLFLAGS
)
\
$(
LIBTOOLFLAGS
)
--mode
=
compile
$(
FC
)
-static
$(
AM_FCFLAGS
)
$(
FCFLAGS
)
This diff is collapsed.
Click to expand it.
python/mtime/libmtime.py
+
3
−
8
View file @
9f08091d
...
...
@@ -34,20 +34,15 @@ if SOFILE is None:
import
os
import
sys
if
sys
.
platform
==
"
darwin
"
:
SOFILE
=
"
.dylib
"
elif
sys
.
platform
==
"
win32
"
:
if
sys
.
platform
==
"
win32
"
:
SOFILE
=
"
.dll
"
else
:
SOFILE
=
"
.so
"
SOFILE
=
os
.
path
.
join
(
os
.
path
.
dirname
(
os
.
path
.
dirname
(
os
.
path
.
dirname
(
os
.
path
.
abspath
(
__file__
)))
),
"
src
"
,
os
.
path
.
dirname
(
os
.
path
.
abspath
(
__file__
)),
"
.libs
"
,
"
lib
mtime{0}
"
.
format
(
SOFILE
),
"
mtime{0}
"
.
format
(
SOFILE
),
)
libmtime
=
cdll
.
LoadLibrary
(
SOFILE
)
...
...
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