Skip to content

Commit

Permalink
Merge pull request #1426 from garberg/repackage_www
Browse files Browse the repository at this point in the history
Repackage web UI using newer tools
  • Loading branch information
garberg authored Jan 22, 2025
2 parents 370ce67 + 658c34a commit d10a572
Show file tree
Hide file tree
Showing 9 changed files with 67 additions and 48 deletions.
3 changes: 2 additions & 1 deletion Dockerfile.www
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@ COPY nipap /nipap
COPY nipap-www /nipap-www
RUN cd /pynipap && pip3 --no-input install --break-system-packages --no-cache-dir . && \

Check failure on line 66 in Dockerfile.www

View workflow job for this annotation

GitHub Actions / docker

DL3003 info: Use WORKDIR to switch to a directory
cd /nipap && pip3 --no-input install --break-system-packages --no-cache-dir . && \
cd /nipap-www && pip3 --no-input install --break-system-packages --no-cache-dir -r requirements.txt && python3 setup.py install && \
cd /nipap-www && pip3 --no-input install --break-system-packages --no-cache-dir . && \
mkdir -p /etc/nipap/ && cp nipap-www.wsgi /etc/nipap/ && \
cd ..

EXPOSE 80
Expand Down
4 changes: 2 additions & 2 deletions nipap-www/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ buildrpm:
builddeb:
# build the source package in the parent directory
# then rename it to project_version.orig.tar.gz
$(PYTHON) setup.py sdist --dist-dir=../
rename -f 's/$(PROJECT)-(\d.*)\.tar\.gz/$(PROJECT)_$$1\.orig\.tar\.gz/' ../*
$(PYTHON) -m build --sdist --outdir=../
rename -f 's/nipap_www-(\d.*)\.tar\.gz/$(PROJECT)_$$1\.orig\.tar\.gz/' ../*
# build the package
debuild -us -uc -sa

Expand Down
1 change: 0 additions & 1 deletion nipap-www/debian/compat

This file was deleted.

10 changes: 7 additions & 3 deletions nipap-www/debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,16 @@ Source: nipap-www
Section: web
Priority: optional
Maintainer: Lukas Garberg <[email protected]>
Build-Depends: debhelper (>= 10), python3 (>= 3.6), python3-setuptools (>= 0.6b3), dh-python
Standards-Version: 4.4.0
Build-Depends: debhelper-compat (= 13),
python3-all,
python3-setuptools,
dh-python
Standards-Version: 4.6.1

Package: nipap-www
Architecture: all
Depends: debconf, python3 (>= 3.6), ${misc:Depends}, python3-flask, python3-pynipap, nipap-common, python3-jinja2
Pre-Depends: debconf
Depends: ${misc:Depends}, ${python3:Depends}
XB-Python-Version: ${python:Versions}
Description: web frontend for NIPAP
A web UI for the NIPAP IP address planning service.
1 change: 1 addition & 0 deletions nipap-www/debian/install
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
nipap-www.wsgi etc/nipap
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
Jinja2 python3-jinja2
pynipap python3-pynipap
nipap nipap-common
Flask python3-flask (>= 2.0.0)
52 changes: 52 additions & 0 deletions nipap-www/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
[project]
name = "nipap-www"
description = "Web frontend for NIPAP"
dynamic = ["version"]
license = {text = "MIT"}
classifiers = [
'Development Status :: 4 - Beta',
'Intended Audience :: Developers',
'Intended Audience :: System Administrators',
'License :: OSI Approved :: MIT License',
'Natural Language :: English',
'Operating System :: POSIX :: Linux',
'Programming Language :: Python :: 3'
]
keywords = ["nipap"]
dependencies = [
"Flask==3.0.3",
"Jinja2==3.1.5",
"nipap",
"pynipap",
]

[project.optional-dependencies]
instrumentation = [
"opentelemetry-api==1.29.0",
"opentelemetry-exporter-otlp==1.29.0",
"opentelemetry-exporter-otlp-proto-common==1.29.0",
"opentelemetry-exporter-otlp-proto-grpc==1.29.0",
"opentelemetry-exporter-otlp-proto-http==1.29.0",
"opentelemetry-instrumentation==0.50b0",
"opentelemetry-instrumentation-flask==0.50b0",
"opentelemetry-instrumentation-wsgi==0.50b0",
"opentelemetry-proto==1.29.0",
"opentelemetry-sdk==1.29.0",
"opentelemetry-semantic-conventions==0.50b0",
"opentelemetry-util-http==0.50b0"
]

[project.urls]
Homepage = "http://SpriteLink.github.io/NIPAP"

[tool.setuptools]
packages = ["nipapwww"]

[tool.setuptools.dynamic]
version = {attr = "nipapwww.__version__"}

[build-system]
requires = [
"setuptools"
]
build-backend = "setuptools.build_meta"
20 changes: 0 additions & 20 deletions nipap-www/requirements.txt

This file was deleted.

22 changes: 2 additions & 20 deletions nipap-www/setup.py
Original file line number Diff line number Diff line change
@@ -1,25 +1,7 @@
from setuptools import find_packages, setup

import nipapwww
from setuptools import setup

setup(
name='nipap-www',
version=nipapwww.__version__,
description='web frontend for NIPAP',
author=nipapwww.__author__,
author_email=nipapwww.__author_email__,
url=nipapwww.__url__,
install_requires=[
"Flask",
"pynipap",
"nipap"
],
license=nipapwww.__license__,
packages=find_packages(exclude=['ez_setup']),
include_package_data=True,
package_data={'nipapwww': ['i18n/*/LC_MESSAGES/*.mo']},
data_files=[
('/etc/nipap/www', ['nipap-www.wsgi', ]),
('share/nipap', ['nipap-www.wsgi', ]),
],
zip_safe=False,
)

0 comments on commit d10a572

Please sign in to comment.