Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move to pyproject.toml #134

Merged
merged 11 commits into from
Jul 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
strategy:
max-parallel: 4
matrix:
python-version: [3.7, 3.8, 3.9, "3.10"]
python-version: ["3.7", "3.8", "3.9", "3.10"]

steps:
- uses: actions/checkout@v2
Expand All @@ -19,9 +19,9 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install tox tox-gh-actions wheel
pip install tox tox-gh-actions build wheel
sed -i '/Django==.*/d' ./requirements.txt # delete django dependency
- name: Test with tox
run: |
tox
python setup.py sdist bdist_wheel install
python -m build
4 changes: 2 additions & 2 deletions .github/workflows/codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ jobs:
pip install -r requirements.txt
pip install coverage
pip install -q -e .
python manage.py makemigrations --check --dry-run
coverage run manage.py test
python tests/manage.py makemigrations --check --dry-run
coverage run --source=admin_smoke tests/manage.py test testproject
coverage xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v2
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pythonpublish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
pip install build wheel twine
- name: Build and publish
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
run: |
python setup.py sdist bdist_wheel
python -m build
twine upload dist/*
49 changes: 49 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
[build-system]
requires = ["setuptools>=61.0", "setuptools-git-versioning"]
build-backend = "setuptools.build_meta"

[tool.setuptools-git-versioning]
enabled = true


[project]
name = "django-image-assets"
dynamic = ["version"]
description = "Django application for image assets management"
readme = "README.md"
authors = [
{ name = "Sergey Tikhonov", email = "zimbler@gmail.com" },
]

dependencies = [
# Django Framework and batteries
"Django>=2.2,<4.2",
"django-bitfield~=2.0",
# Images
"Pillow>=8.1.2,<10.0.0",
]
license = { text = "MIT" }
keywords = [
"django",
"image",
"assets",
]
classifiers = [
'Development Status :: 4 - Beta',
'Environment :: Console',
'Framework :: Django :: 3.2',
'Framework :: Django :: 4.0',
'Framework :: Django :: 4.1',
'Operating System :: POSIX',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Topic :: Internet :: WWW/HTTP :: Dynamic Content :: Content Management System',
]

[project.urls]
homepage = "https://github.com/just-work/django-image-assets"
documentation = "https://github.com/just-work/django-image-assets/blob/master/README.md"
repository = "https://github.com/just-work/django-image-assets.git"
issues = "https://github.com/just-work/django-image-assets/issues"
94 changes: 0 additions & 94 deletions setup.py

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from django.db import migrations, models
import django.db.models.deletion
import image_assets.models
import image_assets
from image_assets import defaults


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from django.db import migrations, models
import django.db.models.deletion
import image_assets.models
import image_assets
from image_assets import defaults


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import bitfield.models
from django.db import migrations, models
import image_assets.validators
import image_assets
from image_assets import defaults


Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 3 additions & 1 deletion testproject/settings.py → tests/testproject/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,12 @@
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
'NAME': os.path.join(BASE_DIR, '../../db.sqlite3'),
}
}

DEFAULT_AUTO_FIELD = 'django.db.models.AutoField'


# Password validation
# https://docs.djangoproject.com/en/3.0/ref/settings/#auth-password-validators
Expand Down
Empty file.
File renamed without changes.
File renamed without changes.
Empty file.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 2 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,6 @@ deps =
django3.2: Django~=3.2.0
django4.0: Django~=4.0.0
django4.1: Django~=4.1.0

change_dir = tests
commands = python manage.py test
Loading