code quality

This commit is contained in:
bkfox
2023-03-13 17:47:00 +01:00
parent 934817da8a
commit 112770eddf
162 changed files with 4798 additions and 4069 deletions

View File

@ -1,35 +1,37 @@
import os
from setuptools import setup, find_packages
from setuptools import find_packages, setup
def to_rst (path):
def to_rst(path):
try:
from pypandoc import convert
return convert(path, 'rst')
return convert(path, "rst")
except ImportError:
print("pypandoc module not found, can not convert Markdown to RST")
return open(path, 'r').read()
return open(path, "r").read()
def to_array(path):
with open(path, "r") as file:
return [r for r in file.read().split("\n") if r]
def to_array (path):
with open(path, 'r') as file:
return [r for r in file.read().split('\n') if r]
setup(
name='aircox',
version='0.9',
license='GPLv3',
author='bkfox',
description='Aircox is a radio programs manager including tools and cms',
long_description=to_rst('README.md'),
url='https://github.com/bkfox/aircox',
name="aircox",
version="0.9",
license="GPLv3",
author="bkfox",
description="Aircox is a radio programs manager including tools and cms",
long_description=to_rst("README.md"),
url="https://github.com/bkfox/aircox",
packages=find_packages(),
include_package_data=True,
install_requires=to_array('requirements.txt'),
install_requires=to_array("requirements.txt"),
classifiers=[
'Framework :: Django',
'Programming Language :: Python',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.2',
'Programming Language :: Python :: 3.3',
"Framework :: Django",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.2",
"Programming Language :: Python :: 3.3",
],
)