kopia lustrzana https://github.com/Hamlib/Hamlib
Revert "Reapply "Update python binding to place some files in site-packages/Hamlib""
This reverts commit 704238da2f
.
pull/1662/head
rodzic
704238da2f
commit
4281a5ef7d
|
@ -83,47 +83,55 @@ uninstall-perl: ## Hamlib-pl.mk
|
||||||
endif
|
endif
|
||||||
# Perl
|
# Perl
|
||||||
|
|
||||||
|
|
||||||
if ENABLE_PYTHON
|
if ENABLE_PYTHON
|
||||||
|
##########################################
|
||||||
|
# Python binding
|
||||||
|
|
||||||
##############################################################################
|
pyexec_ltlib = _Hamlib.la
|
||||||
# 1. We declare a Python extension using 'pyexec_LTLIBRARIES'.
|
|
||||||
# - Tells Automake: “Install this .so into $(pyexecdir).”
|
MOSTLYCLEANFILES += hamlibpy_wrap.c Hamlib.py *.pyc
|
||||||
# - We override 'pyexec_ltlibdir' to place it in a subdirectory: Hamlib
|
BUILT_SOURCES += hamlibpy_wrap.c Hamlib.py
|
||||||
##############################################################################
|
|
||||||
pyexec_LTLIBRARIES = _Hamlib.la
|
# Set by AM_CONDITIONAL in configure.ac
|
||||||
pyexec_ltlibdir = $(pyexecdir)/Hamlib
|
if PYVER_3
|
||||||
|
pytest = py3test.py
|
||||||
|
else !PYVER_3
|
||||||
|
pytest = pytest.py
|
||||||
|
endif
|
||||||
|
# PYVER_3
|
||||||
|
|
||||||
|
example_DATA += $(pytest)
|
||||||
|
|
||||||
|
nodist_pyexec_PYTHON = Hamlib.py
|
||||||
|
nodist__Hamlib_la_SOURCES = hamlibpy_wrap.c
|
||||||
|
|
||||||
_Hamlib_la_SOURCES = hamlibpy_wrap.c
|
|
||||||
_Hamlib_la_LDFLAGS = -no-undefined -module -avoid-version
|
_Hamlib_la_LDFLAGS = -no-undefined -module -avoid-version
|
||||||
_Hamlib_la_LIBADD = $(top_builddir)/src/libhamlib.la $(PYTHON_LIBS)
|
_Hamlib_la_LIBADD = $(top_builddir)/src/libhamlib.la $(PYTHON_LIBS)
|
||||||
|
_Hamlib_ladir = $(pyexecdir)
|
||||||
|
_Hamlib_la_LTLIBRARIES = $(pyexec_ltlib)
|
||||||
|
|
||||||
##############################################################################
|
all-py: $(pyexec_ltlib)
|
||||||
# 2. We declare a set of Python (.py) files using a custom primary, e.g.
|
|
||||||
# 'myhamlib_PYTHON'. Automake installs them into 'myhamlibdir' by default.
|
|
||||||
##############################################################################
|
|
||||||
myhamlib_PYTHON = \
|
|
||||||
__init__.py \
|
|
||||||
Hamlib.py
|
|
||||||
|
|
||||||
# Place them in the exact same directory as the extension: $(pyexecdir)/Hamlib
|
check-py: all-py
|
||||||
myhamlibdir = $(pyexecdir)/Hamlib
|
$(AM_V_at)PYTHONPATH=$(builddir):$(builddir)/.libs \
|
||||||
|
$(PYTHON) $(srcdir)/$(pytest) \
|
||||||
|
|| echo "Python test failed" 1>&2
|
||||||
|
|
||||||
##############################################################################
|
Hamlib.py: hamlibpy_wrap.c
|
||||||
# 3. Distribute these files (so they're included in 'make dist' tarballs).
|
|
||||||
##############################################################################
|
hamlibpy_wrap.c: hamlib.swg $(SWGDEP)
|
||||||
EXTRA_DIST += \
|
$(AM_V_GEN)$(SWIG) -python $(AM_CPPFLAGS) $(PYTHON_CPPFLAGS) -I$(top_srcdir)/bindings \
|
||||||
__init__.py \
|
-o $@ $$(test -f hamlib.swg || echo '$(srcdir)/')hamlib.swg
|
||||||
Hamlib.py
|
|
||||||
|
|
||||||
all-py:
|
|
||||||
install-py:
|
install-py:
|
||||||
@true
|
clean-py:
|
||||||
##############################################################################
|
distclean-py:
|
||||||
# 4. Remove any custom 'install-py:' or 'install-exec-local: install-py'
|
uninstall-py:
|
||||||
# You do NOT need them. Automake already knows how to install these files.
|
|
||||||
##############################################################################
|
endif
|
||||||
|
# Python
|
||||||
|
|
||||||
endif # ENABLE_PYTHON
|
|
||||||
|
|
||||||
if ENABLE_TCL
|
if ENABLE_TCL
|
||||||
##########################################
|
##########################################
|
||||||
|
|
|
@ -1,9 +1,8 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
import sys
|
import sys
|
||||||
import site
|
|
||||||
# Change this path to match your "make install" path
|
# Change this path to match your "make install" path
|
||||||
sys.path.append('/usr/local/lib/python3.12/site-packages')
|
sys.path.append('/usr/local/lib/python3.10/site-packages')
|
||||||
|
|
||||||
## Uncomment to run this script from an in-tree build (or adjust to the
|
## Uncomment to run this script from an in-tree build (or adjust to the
|
||||||
## build directory) without installing the bindings.
|
## build directory) without installing the bindings.
|
||||||
|
@ -18,9 +17,7 @@ def StartUp():
|
||||||
print("%s: Python %s; %s\n" \
|
print("%s: Python %s; %s\n" \
|
||||||
% (sys.argv[0], sys.version.split()[0], Hamlib.cvar.hamlib_version))
|
% (sys.argv[0], sys.version.split()[0], Hamlib.cvar.hamlib_version))
|
||||||
|
|
||||||
print(site.getsitepackages())
|
Hamlib.rig_set_debug(Hamlib.RIG_DEBUG_NONE)
|
||||||
|
|
||||||
Hamlib.rig_set_debug(0)
|
|
||||||
|
|
||||||
# Init RIG_MODEL_DUMMY
|
# Init RIG_MODEL_DUMMY
|
||||||
my_rig = Hamlib.Rig(Hamlib.RIG_MODEL_DUMMY)
|
my_rig = Hamlib.Rig(Hamlib.RIG_MODEL_DUMMY)
|
||||||
|
|
Ładowanie…
Reference in New Issue