From fb9dd13f52c4fd7f7d55b11183f436e634f7d444 Mon Sep 17 00:00:00 2001 From: Adams Pierre David <57180807+adamspd@users.noreply.github.com> Date: Tue, 21 Nov 2023 20:42:51 +0100 Subject: [PATCH 1/2] Minor fixes --- appointment/__init__.py | 2 +- appointment/admin.py | 3 ++- pyproject.toml | 2 +- requirements.txt | 2 +- setup.py | 5 +++++ 5 files changed, 10 insertions(+), 4 deletions(-) diff --git a/appointment/__init__.py b/appointment/__init__.py index 6d7b190..c227403 100644 --- a/appointment/__init__.py +++ b/appointment/__init__.py @@ -4,4 +4,4 @@ __description__ = "Managing appointment scheduling with customizable slots, staff features, and conflict handling." __package_name__ = "django-appointment" __url__ = "https://github.com/adamspd/django-appointment" -__version__ = "2.1.3" +__version__ = "2.1.4" diff --git a/appointment/admin.py b/appointment/admin.py index 2f8f24f..2457eb2 100644 --- a/appointment/admin.py +++ b/appointment/admin.py @@ -42,7 +42,8 @@ class EmailVerificationCodeAdmin(admin.ModelAdmin): @admin.register(Config) class ConfigAdmin(admin.ModelAdmin): - list_display = ('slot_duration', 'lead_time', 'finish_time', 'appointment_buffer_time', 'website_name') + list_display = ( + 'slot_duration', 'lead_time', 'finish_time', 'appointment_buffer_time', 'website_name', 'app_offered_by_label') # Define a custom ModelForm for StaffMember diff --git a/pyproject.toml b/pyproject.toml index 65782a9..3673850 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,3 +1,3 @@ [build-system] -requires = ['setuptools>=40.8.0', 'wheel'] +requires = ['setuptools>=61.0', 'wheel'] build-backend = 'setuptools.build_meta:__legacy__' \ No newline at end of file diff --git a/requirements.txt b/requirements.txt index 88089ec..e4423e8 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,5 +3,5 @@ Pillow==10.1.0 phonenumbers==8.13.25 django-phonenumber-field==7.2.0 babel==2.13.1 -setuptools==69.0.1 +setuptools==69.0.2 pytz~=2023.3.post1 \ No newline at end of file diff --git a/setup.py b/setup.py index 52a2b93..6dfb20b 100644 --- a/setup.py +++ b/setup.py @@ -18,4 +18,9 @@ project_urls={ "Author Website": __author_website__, }, + packages=setuptools.find_packages(), # Find all packages in your project + include_package_data=True, # Include files specified in MANIFEST.in + package_data={ + 'appointment': ['static/css/*.css', 'static/js/*.js', 'static/img/*.png', 'static/img/*.jpg',], + }, ) From ac859cae678302d304dcd03f3d5ed5f149c4ca40 Mon Sep 17 00:00:00 2001 From: Adams Pierre David <57180807+adamspd@users.noreply.github.com> Date: Tue, 21 Nov 2023 21:58:37 +0100 Subject: [PATCH 2/2] Updated workflow and package build process --- .github/workflows/publish.yml | 4 ++-- MANIFEST.in | 12 ++++-------- setup.cfg | 2 -- setup.py | 27 ++++++++++++++++++++++++--- 4 files changed, 30 insertions(+), 15 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 18547c1..a2b0670 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -21,7 +21,7 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip install setuptools wheel twine requests # Added requests for the version check + pip install setuptools wheel twine requests build # Added requests for the version check # Check if the current version is already on PyPI - name: Check version on PyPI @@ -34,7 +34,7 @@ jobs: - name: Build package if: steps.version_check.outputs.version_exists != 'true' run: | - python setup.py sdist bdist_wheel + python -m build - name: Upload to PyPI if: steps.version_check.outputs.version_exists != 'true' diff --git a/MANIFEST.in b/MANIFEST.in index 61e3847..c984bec 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -28,18 +28,14 @@ recursive-include appointment/static/css *.css recursive-include appointment/static/js *.js recursive-include appointment/static/img *.jpg recursive-include appointment/templates/ *.html +recursive-include appointment/tests/base *.py +recursive-include appointment/tests/mixins *.py +recursive-include appointment/tests/models *.py +recursive-include appointment/tests/utils *.py recursive-include appointment/tests *.py recursive-include appointment/utils *.py # Exclusions -exclude release_notes.md -exclude check_version.py -exclude manage.py -exclude db.sqlite3 -exclude .gitignore -exclude .git -exclude .svn -exclude .hg exclude appointment/__pycache__ exclude appointment/migrations/__pycache__ diff --git a/setup.cfg b/setup.cfg index 5317196..6b96dcc 100644 --- a/setup.cfg +++ b/setup.cfg @@ -17,8 +17,6 @@ classifiers = Topic :: Software Development :: Libraries :: Application Frameworks [options] -include_package_data = true -packages = find: python_requires = >=3.8 install_requires = Django>=4.2 diff --git a/setup.py b/setup.py index 6dfb20b..f73638a 100644 --- a/setup.py +++ b/setup.py @@ -18,9 +18,30 @@ project_urls={ "Author Website": __author_website__, }, - packages=setuptools.find_packages(), # Find all packages in your project - include_package_data=True, # Include files specified in MANIFEST.in + packages=setuptools.find_packages(where="appointments"), + package_dir={"": "appointment"}, + include_package_data=True, package_data={ - 'appointment': ['static/css/*.css', 'static/js/*.js', 'static/img/*.png', 'static/img/*.jpg',], + 'appointment': [ + 'static/css/**/*.css', + 'static/js/**/*.js', + 'static/img/**/*.*', + 'templates/**/*.html', + ], + 'appointment.tests': [ + 'mixins/*', + 'base/*', + 'models/*', + 'utils/*', + '*.py' + ], + }, + exclude_package_data={ + "appointment": [ + "django_appointment.egg-info" + ], + "appointment.django_appointment": [ + "egg-info", + ] }, )