Merge branch 'feature/poetry' into develop

develop
Sam Black 10 months ago
commit 963b4f53a2
Signed by: samwwwblack
GPG Key ID: 0FF0223994EA47D8

@ -15,6 +15,7 @@ Changed
-------
- Moved all operations to DBUS services
- Moved to poetry build system
0.5.1_ - 2017-08-17

@ -1,7 +0,0 @@
graft docs
prune docs/_build
graft selinux
graft services
include CHANGELOG.rst
include LICENCE
include sponson-bash-completion.sh

92
poetry.lock generated

@ -0,0 +1,92 @@
[[package]]
name = "click"
version = "8.1.3"
description = "Composable command line interface toolkit"
category = "main"
optional = false
python-versions = ">=3.7"
[package.dependencies]
colorama = {version = "*", markers = "platform_system == \"Windows\""}
[[package]]
name = "colorama"
version = "0.4.5"
description = "Cross-platform colored terminal text."
category = "main"
optional = false
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*"
[[package]]
name = "pydbus"
version = "0.6.0.1"
description = "Pythonic DBus library"
category = "main"
optional = false
python-versions = "*"
develop = false
[package.source]
type = "git"
url = "https://code.lapwing.org/libraries/pydbus.git"
reference = "develop"
resolved_reference = "9302a1ca071e823a6b26466750b976423dddb296"
[[package]]
name = "pyyaml"
version = "6.0"
description = "YAML parser and emitter for Python"
category = "main"
optional = false
python-versions = ">=3.6"
[metadata]
lock-version = "1.1"
python-versions = "^3.9"
content-hash = "aff980f68e7ce0635cf12b2bf1a9eb3c2c0fd860cdb4452d53e6d31e2b906cfe"
[metadata.files]
click = [
{file = "click-8.1.3-py3-none-any.whl", hash = "sha256:bb4d8133cb15a609f44e8213d9b391b0809795062913b383c62be0ee95b1db48"},
{file = "click-8.1.3.tar.gz", hash = "sha256:7682dc8afb30297001674575ea00d1814d808d6a36af415a82bd481d37ba7b8e"},
]
colorama = [
{file = "colorama-0.4.5-py2.py3-none-any.whl", hash = "sha256:854bf444933e37f5824ae7bfc1e98d5bce2ebe4160d46b5edf346a89358e99da"},
{file = "colorama-0.4.5.tar.gz", hash = "sha256:e6c6b4334fc50988a639d9b98aa429a0b57da6e17b9a44f0451f930b6967b7a4"},
]
pydbus = []
pyyaml = [
{file = "PyYAML-6.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:d4db7c7aef085872ef65a8fd7d6d09a14ae91f691dec3e87ee5ee0539d516f53"},
{file = "PyYAML-6.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:9df7ed3b3d2e0ecfe09e14741b857df43adb5a3ddadc919a2d94fbdf78fea53c"},
{file = "PyYAML-6.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:77f396e6ef4c73fdc33a9157446466f1cff553d979bd00ecb64385760c6babdc"},
{file = "PyYAML-6.0-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a80a78046a72361de73f8f395f1f1e49f956c6be882eed58505a15f3e430962b"},
{file = "PyYAML-6.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:f84fbc98b019fef2ee9a1cb3ce93e3187a6df0b2538a651bfb890254ba9f90b5"},
{file = "PyYAML-6.0-cp310-cp310-win32.whl", hash = "sha256:2cd5df3de48857ed0544b34e2d40e9fac445930039f3cfe4bcc592a1f836d513"},
{file = "PyYAML-6.0-cp310-cp310-win_amd64.whl", hash = "sha256:daf496c58a8c52083df09b80c860005194014c3698698d1a57cbcfa182142a3a"},
{file = "PyYAML-6.0-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:897b80890765f037df3403d22bab41627ca8811ae55e9a722fd0392850ec4d86"},
{file = "PyYAML-6.0-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:50602afada6d6cbfad699b0c7bb50d5ccffa7e46a3d738092afddc1f9758427f"},
{file = "PyYAML-6.0-cp36-cp36m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:48c346915c114f5fdb3ead70312bd042a953a8ce5c7106d5bfb1a5254e47da92"},
{file = "PyYAML-6.0-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:98c4d36e99714e55cfbaaee6dd5badbc9a1ec339ebfc3b1f52e293aee6bb71a4"},
{file = "PyYAML-6.0-cp36-cp36m-win32.whl", hash = "sha256:0283c35a6a9fbf047493e3a0ce8d79ef5030852c51e9d911a27badfde0605293"},
{file = "PyYAML-6.0-cp36-cp36m-win_amd64.whl", hash = "sha256:07751360502caac1c067a8132d150cf3d61339af5691fe9e87803040dbc5db57"},
{file = "PyYAML-6.0-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:819b3830a1543db06c4d4b865e70ded25be52a2e0631ccd2f6a47a2822f2fd7c"},
{file = "PyYAML-6.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:473f9edb243cb1935ab5a084eb238d842fb8f404ed2193a915d1784b5a6b5fc0"},
{file = "PyYAML-6.0-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:0ce82d761c532fe4ec3f87fc45688bdd3a4c1dc5e0b4a19814b9009a29baefd4"},
{file = "PyYAML-6.0-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:231710d57adfd809ef5d34183b8ed1eeae3f76459c18fb4a0b373ad56bedcdd9"},
{file = "PyYAML-6.0-cp37-cp37m-win32.whl", hash = "sha256:c5687b8d43cf58545ade1fe3e055f70eac7a5a1a0bf42824308d868289a95737"},
{file = "PyYAML-6.0-cp37-cp37m-win_amd64.whl", hash = "sha256:d15a181d1ecd0d4270dc32edb46f7cb7733c7c508857278d3d378d14d606db2d"},
{file = "PyYAML-6.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:0b4624f379dab24d3725ffde76559cff63d9ec94e1736b556dacdfebe5ab6d4b"},
{file = "PyYAML-6.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:213c60cd50106436cc818accf5baa1aba61c0189ff610f64f4a3e8c6726218ba"},
{file = "PyYAML-6.0-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:9fa600030013c4de8165339db93d182b9431076eb98eb40ee068700c9c813e34"},
{file = "PyYAML-6.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:277a0ef2981ca40581a47093e9e2d13b3f1fbbeffae064c1d21bfceba2030287"},
{file = "PyYAML-6.0-cp38-cp38-win32.whl", hash = "sha256:d4eccecf9adf6fbcc6861a38015c2a64f38b9d94838ac1810a9023a0609e1b78"},
{file = "PyYAML-6.0-cp38-cp38-win_amd64.whl", hash = "sha256:1e4747bc279b4f613a09eb64bba2ba602d8a6664c6ce6396a4d0cd413a50ce07"},
{file = "PyYAML-6.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:055d937d65826939cb044fc8c9b08889e8c743fdc6a32b33e2390f66013e449b"},
{file = "PyYAML-6.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:e61ceaab6f49fb8bdfaa0f92c4b57bcfbea54c09277b1b4f7ac376bfb7a7c174"},
{file = "PyYAML-6.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d67d839ede4ed1b28a4e8909735fc992a923cdb84e618544973d7dfc71540803"},
{file = "PyYAML-6.0-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:cba8c411ef271aa037d7357a2bc8f9ee8b58b9965831d9e51baf703280dc73d3"},
{file = "PyYAML-6.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:40527857252b61eacd1d9af500c3337ba8deb8fc298940291486c465c8b46ec0"},
{file = "PyYAML-6.0-cp39-cp39-win32.whl", hash = "sha256:b5b9eccad747aabaaffbc6064800670f0c297e52c12754eb1d976c57e4f74dcb"},
{file = "PyYAML-6.0-cp39-cp39-win_amd64.whl", hash = "sha256:b3d267842bf12586ba6c734f89d1f5b871df0273157918b0ccefa29deb05c21c"},
{file = "PyYAML-6.0.tar.gz", hash = "sha256:68fb519c14306fec9720a2a5b45bc9f0c8d1b9c72adf45c37baedfcd949c35a2"},
]

@ -0,0 +1,35 @@
[tool.poetry]
name = "sponson"
version = "0.6.0"
description = "'systemd-nspawn' wrapper"
authors = ["Sam Black <samwwwblack@lapwing.org>"]
license = "GPL-3.0-or-later"
readme = "README.rst"
include = ["LICENCE", "selinux/", "services/"]
repository = "https://code.lapwing.org/devops/sponson"
classifiers = [
"Environment :: Console",
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"Intended Audience :: System Administrators",
"Operating System :: POSIX :: Linux",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3 :: Only",
"Topic :: System :: Systems Administration",
]
[tool.poetry.scripts]
sponson = "sponson.cli:main"
[tool.poetry.dependencies]
python = "^3.9"
click = "^8.0"
PyYAML = "^6.0"
pydbus = { git = "https://code.lapwing.org/libraries/pydbus.git", branch = "develop" }
[tool.poetry.dev-dependencies]
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"

@ -1,63 +0,0 @@
# -*- coding: utf-8 -*-
from glob import glob
from setuptools import find_packages
from setuptools import setup
import sponson
from sponson.constants import ETC_DNSMASQ_CONF_DIR
def get_version(fname="sponson/__init__.py"):
with open(fname) as f:
for line in f:
if line.startswith('__version__'):
return eval(line.split('=')[-1])
setup(
name="sponson",
version=get_version(),
packages=find_packages(),
url="https://code.lapwing.org/devops/sponson",
license="GPLv3",
author="Sam Black",
author_email="samwwwblack@lapwing.org",
description="'systemd-nspawn' wrapper",
long_description=sponson.__doc__,
include_package_data=True,
data_files=[
("/usr/libexec/sponson", glob("services/libexec/*")),
("/usr/lib/systemd/network", glob("services/systemd/network/*")),
("/usr/lib/systemd/system", glob("services/systemd/system/*")),
("/usr/share/dbus-1/system-services",
glob("services/dbus/services/*")),
("/usr/share/dbus-1/system.d", glob("services/dbus/system.d/*")),
("/etc/bash_completion.d", ["services/sponson-bash-completion.sh"]),
(ETC_DNSMASQ_CONF_DIR, ["services/resolv.conf"])
],
install_requires=[
"click >= 6.2",
"pyyaml >= 3.11",
"pydbus >= 0.6"
],
dependency_links=[
("git+https://code.lapwing.org/git/libraries/"
"pydbus.git@develop#egg=pydbus-0.6.0.1")
],
entry_points={
"console_scripts": ["sponson = sponson.cli:main"],
},
classifiers=[
"Environment :: Console",
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"Intended Audience :: System Administrators",
("License :: OSI Approved :: "
"GNU General Public License v3 or later (GPLv3+)"),
"Operating System :: POSIX :: Linux",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3 :: Only",
"Topic :: System :: Systems Administration"
]
)

@ -0,0 +1,84 @@
%{?!python3_pkgversion:%global python3_pkgversion 3}
Name: sponson
Version: 0.6.0
Release: 1%{?dist}
Summary: 'systemd-nspawn' wrapper
License: GPL-3.0-or-later
URL: https://code.lapwing.org/devops/sponson/
Source0: %{name}-%{version}.tar.gz
Requires: systemd-container
Requires: dnsmasq
Requires: ostree
Requires: python%{python3_pkgversion}-gobject
Requires: lsof
BuildArch: noarch
BuildRequires: python%{python3_pkgversion}-devel
BuildRequires: python%{python3_pkgversion}-poetry
BuildRequires: systemd-rpm-macros
%global _description %{expand:
Sponson is a tool to create and setup ``systemd-nspawn`` containers
in a Docker-like way, without using Docker.}
%description %_description
%package -n python%{python3_pkgversion}-%{name}
Summary: %{summary}
%{?python_provide:%python_provide python3-%{name}}
%description -n python%{python3_pkgversion}-%{name} %_description
%prep
%autosetup -p1 -n %{name}-%{version}
%generate_buildrequires
%pyproject_buildrequires
%build
%pyproject_wheel
%install
%pyproject_install
%pyproject_save_files %{name}
mkdir -p %{buildroot}%{_unitdir}/ \
%{buildroot}%{_systemd_util_dir}/network/ \
%{buildroot}%{_libexecdir}/%{name}/ \
%{buildroot}%{_datadir}/dbus-1/system-services/ \
%{buildroot}%{_datadir}/dbus-1/system.d/ \
%{buildroot}%{_datadir}/bash-completion/completions/
cp -a services/dbus/* %{buildroot}%{_datadir}/dbus-1/
cp -a services/libexec/* %{buildroot}%{_libexecdir}/%{name}/
cp -a services/systemd/* %{buildroot}%{_systemd_util_dir}/
cp -a services/%{name}-bash-completion.sh %{buildroot}%{_datadir}/bash-completion/completions/%{name}
# Remove ##% to enable checks
##%%check
##%%pytest
%files -n python%{python3_pkgversion}-%{name} -f %{pyproject_files}
##%%license LICENCE
##%%doc README.rst
%{_bindir}/%{name}
%{_unitdir}/%{name}*.service
%{_systemd_util_dir}/network/%{name}*.netdev
%{_systemd_util_dir}/network/%{name}*.network
%{_libexecdir}/%{name}/*
%{_datadir}/dbus-1/system-services/org.lapwing.%{name}.*.service
%{_datadir}/dbus-1/system.d/org.lapwing.%{name}.*.conf
%{_datadir}/bash-completion/completions/%{name}
%changelog
* Tue Aug 23 2022 Sam Black <samwwwblack@lapwing.org>
- Initial SPEC file
Loading…
Cancel
Save