Skip to content

Commit 83cb4c7

Browse files
committed
chore: add DEB/RPM packaging configuration
DEB packaging: - debian/control: Build-Depends on libconfig++-dev, python3-setuptools, libboost-python-dev - debian/rules: dh sequence with dh_auto_test override - debian/source/format: 3.0 (native) - debian/changelog, compat, copyright RPM packaging: - python-libconfig.spec: BuildRequires boost-devel, python3-devel, libconfig-devel, gcc-c++ - Use %{?dist} tag for Release - %doc README.md
1 parent 7223352 commit 83cb4c7

7 files changed

Lines changed: 102 additions & 17 deletions

File tree

debian/changelog

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
python-libconfig (0.2.0-1) unstable; urgency=medium
2+
3+
* Upgrade to support libconfig 1.1.x ~ 1.8.x
4+
* Export Setting class with full API
5+
* Add type-safe lookup methods
6+
* Add options/format/precision/tab_width support
7+
* Fix bugs in children(), setValue dispatch, add* empty path
8+
9+
-- Cnangel <cnangel@gmail.com> Thu, 15 May 2026 00:00:00 +0000

debian/compat

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
10

debian/control

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
Source: python-libconfig
2+
Section: python
3+
Priority: optional
4+
Maintainer: Cnangel <cnangel@gmail.com>
5+
Build-Depends: debhelper (>= 9),
6+
libconfig++-dev,
7+
python3-dev,
8+
python3-setuptools,
9+
libboost-python-dev,
10+
g++
11+
Standards-Version: 4.6.0
12+
Homepage: https://github.com/cnangel/python-libconfig
13+
14+
Package: python3-libconfig
15+
Architecture: any
16+
Depends: ${python3:Depends}, ${misc:Depends}, ${shlibs:Depends}
17+
Description: Python bindings to the C++ library libconfig
18+
python-libconfig provides Python bindings for the libconfig C++
19+
configuration file library. Supports libconfig 1.1.x ~ 1.8.x.
20+
.
21+
Features:
22+
- Config and Setting object bindings via Boost.Python
23+
- Type-safe lookup methods (lookupInt, lookupString, etc.)
24+
- Format, options, precision, and tab width control
25+
- Full Setting API (navigation, type checks, source info)

debian/copyright

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
2+
Upstream-Name: pylibconfig
3+
Upstream-Contact: Cnangel <cnangel@gmail.com>
4+
Source: https://github.com/cnangel/python-libconfig
5+
6+
Files: *
7+
Copyright: 2010-2026 Cnangel <cnangel@gmail.com>
8+
License: BSD
9+
Redistribution and use in source and binary forms, with or without
10+
modification, are permitted provided that the following conditions are met:
11+
.
12+
1. Redistributions of source code must retain the above copyright notice,
13+
this list of conditions and the following disclaimer.
14+
2. Redistributions in binary form must reproduce the above copyright
15+
notice, this list of conditions and the following disclaimer in the
16+
documentation and/or other materials provided with the distribution.
17+
3. Neither the name of the copyright holder nor the names of its
18+
contributors may be used to endorse or promote products derived from
19+
this software without specific prior written permission.
20+
.
21+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
22+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24+
ARE DISCLAIMED.

debian/rules

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#!/usr/bin/make -f
2+
3+
%:
4+
dh $@
5+
6+
override_dh_auto_configure:
7+
python3 setup.py build
8+
9+
override_dh_auto_test:
10+
BUILD_DIR=$$(ls -d build/lib.*-*-* 2>/dev/null | head -1); \
11+
[ -n "$$BUILD_DIR" ] || (echo "Error: build directory not found" && exit 1); \
12+
PYTHONPATH=$$BUILD_DIR python3 -m unittest tests.test -v
13+
14+
override_dh_auto_install:
15+
python3 setup.py install --root=$(CURDIR)/debian/python3-libconfig --install-layout=deb
16+
17+
# Skip dh_python3 on non-Debian systems
18+
override_dh_python3:
19+
@echo "Skipping dh_python3 (not on Debian)"

debian/source/format

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.0 (native)

python-libconfig.spec

Lines changed: 23 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,54 @@
1-
Summary: A python interface to libconfig
1+
Summary: A Python interface to libconfig
22
Name: python-libconfig
3-
Version: 0.0.4
3+
Version: 0.2.1
44
Release: 1%{?dist}
55
License: bsd
66
Group: Development/Libraries
77
Source0: %{name}-%{version}.tar.gz
88
URL: https://github.com/cnangel/python-libconfig
99

1010
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
11-
BuildRequires: boost-devel python-devel libconfig libconfig-devel
11+
BuildRequires: boost-devel python3-devel libconfig libconfig-devel gcc-c++
1212
Requires: libconfig
1313

1414
%description
15-
Python interface to libconfig
16-
17-
python-libconfig is an interface to the popular config for Python.
15+
Python bindings to the C++ library libconfig (1.1.x ~ 1.8.x).
16+
Supports reading, writing, and manipulating configuration files
17+
via the libconfig C++ API through Boost.Python.
1818

1919
%prep
2020
%setup -q -n %{name}-%{version}
2121

2222
%build
23-
rm -f doc/*~
2423
export libdirname=%{_lib}
25-
CFLAGS="$RPM_OPT_FLAGS" python setup.py build
24+
CFLAGS="$RPM_OPT_FLAGS" python3 setup.py build
2625

2726
%install
2827
rm -rf $RPM_BUILD_ROOT
2928

3029
export libdirname=%{_lib}
31-
python setup.py install --root=$RPM_BUILD_ROOT --record=INSTALLED_FILES
30+
python3 setup.py install --root=$RPM_BUILD_ROOT --record=INSTALLED_FILES
3231

3332
%clean
3433
rm -rf $RPM_BUILD_ROOT
3534

3635
%files -f INSTALLED_FILES
3736
%defattr(-,root,root)
38-
%doc README
37+
%doc README.md
3938

4039
%changelog
41-
* Sat Mar 18 2023 Cnangel <cnangel@gmail.com> 0.0.4-1
42-
- fix root path issue.
43-
* Mon Nov 04 2019 Cnangel <cnangel@gmail.com> 0.0.3-1
44-
- update for support python3
45-
* Mon Apr 14 2014 Cnangel <cnangel@gmail.com> 0.0.2-1
46-
- modify some deps method
40+
* Sat May 16 2026 Cnangel <cnangel@gmail.com> 0.2.1-1
41+
- Fix version guards for multi-version libconfig compatibility (1.1.x ~ 1.8.x)
42+
- Fix isString() implementation to use getType() instead of non-existent API
43+
44+
* Fri May 15 2026 Cnangel <cnangel@gmail.com> 0.2.0-1
45+
- Upgrade to support libconfig 1.1.x ~ 1.8.x
46+
- Export Setting class with full API
47+
- Add type-safe lookup methods (lookupInt, lookupString, etc.)
48+
- Add options, format, precision, tab_width, clear
49+
- Export type/format/option constants
50+
- Fix bugs: children() shadowed declaration, setValue type dispatch, add* empty path
51+
- Use setValue with Python type introspection dispatching
52+
4753
* Fri Apr 16 2010 Cnangel <cnangel@gmail.com> 0.0.1-1
48-
- build the first spec file
54+
- Initial build

0 commit comments

Comments
 (0)