-
Notifications
You must be signed in to change notification settings - Fork 132
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1316 from garberg/py3.6-fixes
Move to Python 3
- Loading branch information
Showing
52 changed files
with
1,728 additions
and
1,853 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,7 +32,7 @@ | |
# via a volume. | ||
# | ||
|
||
FROM ubuntu:xenial | ||
FROM ubuntu:bionic | ||
MAINTAINER Kristian Larsson <[email protected]> | ||
|
||
ENV DEBIAN_FRONTEND=noninteractive | ||
|
@@ -44,19 +44,30 @@ RUN apt-get update -qy && apt-get upgrade -qy \ | |
libpq-dev \ | ||
libsqlite3-dev \ | ||
postgresql-client \ | ||
python \ | ||
python-all \ | ||
python-docutils \ | ||
python-pip \ | ||
python-dev \ | ||
&& pip --no-input install envtpl \ | ||
software-properties-common \ | ||
python3 \ | ||
python3-all \ | ||
python3-pip \ | ||
python3-dev \ | ||
libsasl2-dev \ | ||
libldap2-dev \ | ||
libssl-dev \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
# Install any additional CA certs from ca_certs folder required by corp proxies etc | ||
RUN mkdir -p /usr/share/ca-certificates/extra | ||
COPY ca_certs/*.crt /usr/share/ca-certificates/extra/ | ||
RUN ls /usr/share/ca-certificates/extra/*.crt | sed 's/\/usr\/share\/ca-certificates\///g' >> /etc/ca-certificates.conf | ||
RUN update-ca-certificates | ||
RUN pip3 install --upgrade pip | ||
RUN pip3 config set global.cert /etc/ssl/certs/ca-certificates.crt | ||
|
||
|
||
COPY nipap /nipap | ||
WORKDIR /nipap | ||
RUN pip --no-input install -r requirements.txt \ | ||
&& python setup.py install | ||
RUN pip3 install --no-input envtpl | ||
RUN pip3 --no-input install -r requirements.txt \ | ||
&& python3 setup.py install | ||
|
||
EXPOSE 1337 | ||
ENV LISTEN_ADDRESS=0.0.0.0 LISTEN_PORT=1337 SYSLOG=false DB_PORT=5432 DB_SSLMODE=disable | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
Custom CA Certs for docker containers | ||
===================================== | ||
If you need to include specific CA certs which you must trust, place them here | ||
in PEM format, named \*.crt. | ||
|
||
This may be required if you need to build the container from inside a network | ||
which uses a proxy or similar, or other dependencies towards internal services | ||
are included in your containers. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,13 +2,12 @@ Source: nipap-www | |
Section: web | ||
Priority: optional | ||
Maintainer: Lukas Garberg <[email protected]> | ||
Build-Depends: debhelper (>= 5.0.38), debhelper (>= 7), | ||
python (>= 2.7), python-setuptools (>= 0.6b3) | ||
Build-Depends: debhelper (>= 5.0.38), debhelper (>= 7), python3 (>= 3.6), python3-setuptools (>= 0.6b3), dh-python | ||
Standards-Version: 4.4.0 | ||
|
||
Package: nipap-www | ||
Architecture: all | ||
Depends: debconf, python (>= 2.7), ${misc:Depends}, python-flask, python-pynipap, nipap-common, python-jinja2 | ||
Depends: debconf, python3 (>= 3.6), ${misc:Depends}, python3-flask, python3-pynipap, nipap-common, python3-jinja2 | ||
XB-Python-Version: ${python:Versions} | ||
Description: web frontend for NIPAP | ||
A web UI for the NIPAP IP address planning service. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
Jinja2 python-jinja2 | ||
pynipap python-pynipap | ||
Jinja2 python3-jinja2 | ||
pynipap python3-pynipap | ||
nipap nipap-common |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
#!/usr/bin/make -f | ||
|
||
%: | ||
dh $@ --with python2 --buildsystem=python_distutils | ||
dh $@ --with python3 --buildsystem=python_distutils | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,3 @@ | ||
import os | ||
|
||
from flask import Flask, redirect, url_for | ||
|
||
from nipap.nipapconfig import NipapConfig | ||
|
||
import pynipap | ||
|
||
__version__ = "0.31.2" | ||
__author__ = "Kristian Larsson, Lukas Garberg" | ||
__author_email__ = "[email protected], [email protected]" | ||
|
@@ -15,6 +7,14 @@ | |
|
||
|
||
def create_app(test_config=None): | ||
|
||
# Moved imports here to be able to import this module without having the | ||
# dependencies installed. Relevant during initial package build. | ||
import os | ||
from flask import Flask, redirect, url_for | ||
from nipap.nipapconfig import NipapConfig | ||
import pynipap | ||
|
||
# create and configure the app | ||
app = Flask(__name__, instance_relative_config=True) | ||
app.config.from_mapping( | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
include README.rst MANIFEST.in | ||
include *.man.rst | ||
include requirements.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.