Skip to content

Commit

Permalink
Update setuptools config and add support for Py 3.12
Browse files Browse the repository at this point in the history
  • Loading branch information
Josh5 committed Feb 25, 2024
1 parent 7b39735 commit dad0a7e
Show file tree
Hide file tree
Showing 7 changed files with 37 additions and 81 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,10 @@ jobs:
git tag --list
# Setup python environment
- name: Set up Python 3.7
- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: 3.7
python-version: 3.11

# Restore the python cache if it exists
- name: Restore python cache
Expand Down Expand Up @@ -145,7 +145,8 @@ jobs:
python ./setup.py --quiet --version
echo "Long version:"
python ./setup.py --quiet fullversion
python ./setup.py sdist bdist_wheel
python -m build --no-isolation --skip-dependency-check --wheel
python -m build --no-isolation --skip-dependency-check --sdist
# Read the python package distribution data (save version to file)
- name: Read python package distribution data
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/python_lint_and_run_unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]

steps:
- uses: actions/checkout@v4
Expand Down
60 changes: 0 additions & 60 deletions .gitlab-ci.yml

This file was deleted.

28 changes: 20 additions & 8 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,37 +1,49 @@
# Include docs
include README.md
include LICENSE
# Include some images
include logo.png
# Include requirements files
include requirements.txt
include requirements-dev.txt

recursive-include unmanic *
# Include module files
recursive-include unmanic **
include versioninfo.py

# Exclude compiled files
global-exclude *.py[cod]

# Frontend development files
# Exclude frontend development files
recursive-exclude unmanic/webserver/frontend **/*.git*
recursive-exclude unmanic/webserver/frontend **/dist/**
recursive-exclude unmanic/webserver/frontend **/node_modules/**
recursive-exclude unmanic/webserver/frontend **/.quasar/**
# Cordova related directories and files
# Exclude cordova related directories and files
recursive-exclude unmanic/webserver/frontend **/src-cordova/node_modules/**
recursive-exclude unmanic/webserver/frontend **/src-cordova/platforms/**
recursive-exclude unmanic/webserver/frontend **/src-cordova/plugins/**
recursive-exclude unmanic/webserver/frontend **/src-cordova/www/**
# Capacitor related directories and files
# Exclude capacitor related directories and files
recursive-exclude unmanic/webserver/frontend **/src-capacitor/www/**
recursive-exclude unmanic/webserver/frontend **/src-capacitor/node_modules/**
# BEX related directories and files
# Exclude BEX related directories and files
recursive-exclude unmanic/webserver/frontend **/src-bex/www/**
recursive-exclude unmanic/webserver/frontend **/src-bex/js/core/**
# Log files
# Exclude any log files
recursive-exclude unmanic/webserver/frontend **/npm-debug.log*
recursive-exclude unmanic/webserver/frontend **/yarn-debug.log*
recursive-exclude unmanic/webserver/frontend **/yarn-error.log*
# Editor directories and files
# Exclude editor directories and files
recursive-exclude unmanic/webserver/frontend **/*.suo
recursive-exclude unmanic/webserver/frontend **/*.ntvs*
recursive-exclude unmanic/webserver/frontend **/*.njsproj
recursive-exclude unmanic/webserver/frontend **/*.sln
recursive-exclude unmanic/webserver/frontend **/.idea/**
# Exclude tests
recursive-exclude tests **
# Exclude virtual env
recursive-exclude venv **

# Frontend compiled assets
# Remove all frontend compiled assets
prune unmanic/webserver/public
4 changes: 2 additions & 2 deletions docs/DEVELOPING.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,15 +60,15 @@ python3 -m pip install --upgrade -r ./requirements.txt -r ./requirements-dev.txt
Then install the module:

```
python3 ./setup.py develop
python3 -m pip install --editable .
```

This creates an egg symlink to the project directory for development.

To later uninstall the development symlink:

```
python3 ./setup.py develop --uninstall
python3 -m pip uninstall unmanic
```

You should now be able to run unmanic from the commandline:
Expand Down
11 changes: 6 additions & 5 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
flake8>=3.7.9
pycodestyle>=2.5.0
pytest>=5.4.1
wheel==0.38.4
setuptools>=39.0.1
flake8>=7.0.0
pycodestyle>=2.11.1
pytest>=8.0.2
wheel>=0.42.0
setuptools>=69.1.1
build>=1.0.3

# API schema exporting
apispec
Expand Down
6 changes: 4 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
import subprocess
import sys
import glob
from setuptools import setup, find_packages, Command
from setuptools import setup, find_packages, Command, find_namespace_packages
import setuptools.command.build_py

if sys.version_info[0] < 3:
Expand Down Expand Up @@ -63,6 +63,7 @@
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
'Operating System :: POSIX :: Linux',
'Operating System :: Unix',
'License :: OSI Approved :: GNU General Public License v3 (GPLv3)',
Expand Down Expand Up @@ -201,7 +202,8 @@ def requirements_dev():
extras_require={
'dev': requirements_dev()
},
packages=[src_dir],
packages=find_namespace_packages(include=[f"{src_dir}*"]),
include_package_data=True,
entry_points={
'console_scripts': [
'%s=%s.service:main' % (module_name, module_name)
Expand Down

0 comments on commit dad0a7e

Please sign in to comment.