Skip to content

Commit

Permalink
packages MAINTENANCE forbid building cffi bindings for now
Browse files Browse the repository at this point in the history
  • Loading branch information
michalvasko committed Jun 2, 2020
1 parent 8baded3 commit bf5e182
Show file tree
Hide file tree
Showing 7 changed files with 6 additions and 68 deletions.
3 changes: 0 additions & 3 deletions packages/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
set(PACKAGE "libyang")
set(CPP_PACKAGE "libyang-cpp")
set(PYTHON_PACKAGE "python3-yang")
set(PYTHON_CFFI_PACKAGE "python3-libyang")

find_program(DEB_BUILDER NAMES debuild)
find_program(RPM_BUILDER NAMES rpmbuild)
Expand All @@ -26,8 +25,6 @@ configure_file(${PROJECT_SOURCE_DIR}/packages/debian.${CPP_PACKAGE}-dev.install
# no python package for Debian because there is only SWIG 3.10 on Debian 9 :-/
#configure_file(${PROJECT_SOURCE_DIR}/packages/debian.${PYTHON_PACKAGE}.install
# ${PROJECT_BINARY_DIR}/build-packages/debian.${PYTHON_PACKAGE}.install COPYONLY)
configure_file(${PROJECT_SOURCE_DIR}/packages/debian.${PYTHON_CFFI_PACKAGE}.install
${PROJECT_BINARY_DIR}/build-packages/debian.${PYTHON_CFFI_PACKAGE}.install COPYONLY)

if(NOT DEB_BUILDER)
message(STATUS "Missing tools (devscripts, debhelper package) for building DEB package.")
Expand Down
31 changes: 1 addition & 30 deletions packages/debian.control.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,7 @@ Source: @PACKAGE@
Maintainer: CESNET <[email protected]>
Priority: extra
Standards-Version: 3.8.2
Build-Depends:
debhelper (>= 9),
dh-python,
make,
gcc,
g++,
doxygen,
cmake,
pkg-config,
libpcre3-dev,
libcmocka-dev,
python3 (>= 3.5),
python3-cffi,
python3-setuptools,
Build-Depends: debhelper (>= 9), gcc
Homepage: https://github.com/CESNET/libyang

Package: @PACKAGE@
Expand Down Expand Up @@ -53,19 +40,3 @@ Depends: @CPP_PACKAGE@ (=@LIBYANG_VERSION@)
Section: debug
Architecture: any
Description: Debug symbols of C++ bidings of libyang library.

Package: @PYTHON_CFFI_PACKAGE@
Depends:
${misc:Depends},
${python3:Depends},
python3-cffi,
@PACKAGE@ (=@LIBYANG_VERSION@),
Section: libs
Architecture: any
Description: CFFI bindings of libyang library to Python language.

Package: @PYTHON_CFFI_PACKAGE@-dbg
Depends: @PYTHON_CFFI_PACKAGE@ (=@LIBYANG_VERSION@)
Section: debug
Architecture: any
Description: Debug symbols of Python CFFI bindings of libyang library.
1 change: 0 additions & 1 deletion packages/debian.python3-libyang.install

This file was deleted.

5 changes: 2 additions & 3 deletions packages/debian.rules.in
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,15 @@
export DH_VERBOSE=1

%:
dh $@ --with python3
dh $@

override_dh_strip:
dh_strip -p@PACKAGE@ --dbg-package=@PACKAGE@-dbg
dh_strip -p@CPP_PACKAGE@ --dbg-package=@CPP_PACKAGE@-dbg
dh_strip -p@PYTHON_CFFI_PACKAGE@ --dbg-package=@PYTHON_CFFI_PACKAGE@-dbg

override_dh_auto_configure:
cmake -DCMAKE_INSTALL_PREFIX=/usr -DFORCE_INSRC_BUILD=ON -DCMAKE_BUILD_TYPE="Package" -DENABLE_LYD_PRIV=ON \
-DGEN_LANGUAGE_BINDINGS=ON -DGEN_PYTHON_BINDINGS=OFF -DGEN_PYTHON_CFFI_BINDINGS=ON .
-DGEN_LANGUAGE_BINDINGS=ON -DGEN_PYTHON_BINDINGS=OFF .

override_dh_auto_test:
ctest --output-on-failure
6 changes: 0 additions & 6 deletions packages/libyang.dsc.in
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ Binary:
@CPP_PACKAGE@,
@CPP_PACKAGE@-dev,
@CPP_PACKAGE@-dbg,
@PYTHON_CFFI_PACKAGE@,
@PYTHON_CFFI_PACKAGE@-dbg,
Maintainer: CESNET <[email protected]>
Version: @LIBYANG_VERSION@
Architecture: any
Expand All @@ -17,7 +15,6 @@ Homepage: https://github.com/CESNET/libyang
Vcs-Git: https://github.com/CESNET/libyang
Build-Depends:
debhelper (>= 9),
dh-python,
make,
gcc,
g++,
Expand All @@ -26,6 +23,3 @@ Build-Depends:
pkg-config,
libpcre3-dev,
libcmocka-dev,
python3 (>= 3.5),
python3-cffi,
python3-setuptools,
27 changes: 3 additions & 24 deletions packages/libyang.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,8 @@ BuildRequires: swig >= 3.0.12

%if 0%{?suse_version} + 0%{?fedora} + 0%{?centos_version} > 0
BuildRequires: python3-devel
BuildRequires: python3-cffi
BuildRequires: python3-setuptools
%else
BuildRequires: python36-devel
BuildRequires: python36-cffi
BuildRequires: python36-setuptools
%endif

%endif
Expand All @@ -68,17 +64,6 @@ Summary: SWIG binding to python
Requires: @CPP_PACKAGE@ = %{version}-%{release}
Requires: %{name} = %{version}-%{release}

%package -n @PYTHON_CFFI_PACKAGE@
Summary: CFFI binding to python
Requires: %{name} = %{version}-%{release}
%if 0%{?suse_version} + 0%{?fedora} + 0%{?centos_version} > 0
Requires: python3
Requires: python3-cffi
%else
Requires: python36
Requires: python36-cffi
%endif

%description -n @CPP_PACKAGE@
Bindings of libyang library to C++ language.

Expand All @@ -87,9 +72,6 @@ Headers of bindings to c++ language.

%description -n @PYTHON_PACKAGE@
SWIG bindings of libyang library to python language.

%description -n @PYTHON_CFFI_PACKAGE@
CFFI bindings of libyang library to python language.
%endif

%description devel
Expand All @@ -105,7 +87,7 @@ mkdir build
%build
cd build
%if %{with_lang_bind}
%define cmake_lang_bind "-DGEN_LANGUAGE_BINDINGS=ON -DGEN_PYTHON_CFFI_BINDINGS=ON"
%define cmake_lang_bind "-DGEN_LANGUAGE_BINDINGS=ON"
%else
%define cmake_lang_bind "-DGEN_LANGUAGE_BINDINGS=OFF"
%endif
Expand Down Expand Up @@ -160,6 +142,7 @@ make DESTDIR=%{buildroot} install
%dir %{_includedir}/libyang/

%if %{with_lang_bind}

%files -n @CPP_PACKAGE@
%defattr(-,root,root)
%{_libdir}/libyang-cpp.so.*
Expand All @@ -173,12 +156,8 @@ make DESTDIR=%{buildroot} install

%files -n @PYTHON_PACKAGE@
%defattr(-,root,root)
%{_libdir}/python*/site-packages/yang*
%{_libdir}/python*

%files -n @PYTHON_CFFI_PACKAGE@
%defattr(-,root,root)
%{_libdir}/python3*/site-packages/libyang*
%{_libdir}/python3*/site-packages/_libyang*.so
%endif

%changelog
1 change: 0 additions & 1 deletion packages/local-deb.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ cp "@PROJECT_SOURCE_DIR@/packages/debian.@[email protected]" debian/@[email protected]
cp "@PROJECT_SOURCE_DIR@/packages/debian.@[email protected]" debian/@[email protected]
cp "@PROJECT_SOURCE_DIR@/packages/debian.@[email protected]" debian/@[email protected]
cp "@PROJECT_SOURCE_DIR@/packages/debian.@[email protected]" debian/@[email protected]
cp "@PROJECT_SOURCE_DIR@/packages/debian.@[email protected]" debian/@[email protected]
echo -e "@PACKAGE@ (@LIBYANG_VERSION@) stable; urgency=low\n" >debian/changelog
git log -10 --pretty=format:' * %s (%aN)%n' 2>/dev/null >>debian/changelog || echo -e " * unknown changes \n" >>debian/changelog
git log -1 --pretty=format:'%n -- %aN <%aE> %aD%n' >>debian/changelog 2>/dev/null || echo " -- ${USER} <${USER}@`hostname`> `date -R`" >>debian/changelog
Expand Down

0 comments on commit bf5e182

Please sign in to comment.