Skip to content

Commit

Permalink
reorg to a more typical flask app
Browse files Browse the repository at this point in the history
  • Loading branch information
furlongm committed Aug 30, 2024
1 parent 315029f commit 7fe76d1
Show file tree
Hide file tree
Showing 8 changed files with 29 additions and 15 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/create-release-and-upload-assets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,13 @@ jobs:
needs: create-release
runs-on: ubuntu-latest
container:
image: debian:buster
image: debian:bookworm
steps:
- name: Install build dependencies
run: |
apt update
export DEBIAN_FRONTEND=noninteractive
apt -y install python3-stdeb dh-python
# https://bugs.launchpad.net/bugs/1916551
sed -i -e "s/python-all/python3-all/g" /usr/lib/python3/dist-packages/stdeb/util.py
- uses: actions/checkout@v2
- name: Download upload_url artifact
uses: actions/download-artifact@v2
Expand Down
4 changes: 2 additions & 2 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
include README.md
include openvpn-monitor.py
recursive-include openvpn_monitor *.py
include openvpn-monitor.conf.example
include AUTHORS
include COPYING
include MANIFEST.in
include VERSION.txt
include requirements.txt
recursive-include images *
recursive-include openvpn_monitor/static/images *
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
36 changes: 26 additions & 10 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,24 +1,40 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Copyright 2011 VPAC <http://www.vpac.org>
# Copyright 2012-2024 Marcus Furlong <[email protected]>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, version 3 only.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>

import os
import sys
from setuptools import setup
from setuptools import setup, find_packages

with open('VERSION.txt', 'r') as v:
with open('VERSION.txt', 'r', encoding='utf_8') as v:
version = v.readline().strip()

with open('README.md', 'r') as r:
with open('README.md', 'r', encoding='utf_8') as r:
long_description = r.read()

for dirpath, dirnames, filenames in os.walk('images/flags'):
with open('requirements.txt', 'r', encoding='utf_8') as rt:
install_requires = rt.read().splitlines()

data_files = []

for dirpath, dirnames, filenames in os.walk('openvpn_monitor/static/images/flags'):
data_files = [('share/openvpn-monitor/images/flags',
[os.path.join(dirpath, f) for f in filenames])]

with open('requirements.txt') as rt:
install_requires = []
for line in rt.read().splitlines():
install_requires.append(line)

if sys.prefix == '/usr':
conf_path = '/etc'
else:
Expand All @@ -34,7 +50,7 @@
license='GPLv3',
keywords='web openvpn monitor',
url='http://openvpn-monitor.openbytes.ie',
py_modules=['openvpn-monitor', ],
packages=find_packages(),
install_requires=install_requires,
long_description=long_description,
long_description_content_type='text/markdown',
Expand Down

0 comments on commit 7fe76d1

Please sign in to comment.