diff --git a/Makefile b/Makefile index f93b1769..d9c37d44 100644 --- a/Makefile +++ b/Makefile @@ -45,7 +45,7 @@ help: @echo " clean ------------ - Non-destructive clean" @echo " clean-pyc - Remove .pyc/__pycache__ files" @echo " clean-docs - Remove documentation build artifacts." - @echo " clean-build - Remove setup artifacts." + @echo " clean-build - Remove build artifacts." @echo "bump - Bump patch version number." @echo "bump-minor - Bump minor version number." @echo "bump-major - Bump major version number." @@ -65,7 +65,9 @@ bump-major: bumpversion major release: - python setup.py register sdist bdist_wheel upload --sign --identity="$(PGPIDENT)" + python -m pip install --upgrade build twine + python -m build + twine upload --sign --identity="$(PGPIDENT) dist/*" Documentation: (cd "$(SPHINX_DIR)"; $(MAKE) html) @@ -145,7 +147,7 @@ cov: (cd $(TESTDIR); $(PYTEST) -x --cov="$(PROJ)" --cov-report=html) build: - $(PYTHON) setup.py sdist bdist_wheel + $(PYTHON) -m build distcheck: lint test clean diff --git a/README.rst b/README.rst index 38ff056f..598869f8 100644 --- a/README.rst +++ b/README.rst @@ -252,7 +252,7 @@ To install using ``pip``: .. code-block:: bash - $ pip install -U django-celery-beat + $ pip install --upgrade django-celery-beat Downloading and installing from source -------------------------------------- @@ -264,14 +264,13 @@ You can install it by doing the following : .. code-block:: bash + $ python3 -m venv .venv + $ source .venv/bin/activate + $ pip install --upgrade build pip $ tar xvfz django-celery-beat-0.0.0.tar.gz $ cd django-celery-beat-0.0.0 - $ python setup.py build - # python setup.py install - -The last command must be executed as a privileged user if -you are not currently using a virtualenv. - + $ python -m build + $ pip install --upgrade . After installation, add ``django_celery_beat`` to Django's settings module: diff --git a/docker-compose.yml b/docker-compose.yml index ee48dd27..2b787ec3 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -8,6 +8,8 @@ services: build: context: . dockerfile: docker/base/Dockerfile + tags: + - django-celery-beat_base:latest command: ["sleep", "inf"] django: diff --git a/docker/base/Dockerfile b/docker/base/Dockerfile index e8114d84..5f101447 100644 --- a/docker/base/Dockerfile +++ b/docker/base/Dockerfile @@ -9,6 +9,7 @@ RUN apt-get update && apt-get install --yes --no-install-recommends \ wait-for-it RUN pip3 install --user \ + build \ django-createsuperuserwithpassword \ psycopg2-binary @@ -19,8 +20,7 @@ COPY requirements/ /app/requirements/ WORKDIR /app -RUN python3 setup.py develop --user - +RUN pip3 install --user --editable ".[develop]" WORKDIR / diff --git a/docs/includes/installation.txt b/docs/includes/installation.txt index ac16b11f..f6300550 100644 --- a/docs/includes/installation.txt +++ b/docs/includes/installation.txt @@ -6,7 +6,15 @@ or from source. To install using `pip`,:: - $ pip install -U django-celery-beat + $ pip install --upgrade django-celery-beat + +Installing the current default branch +------------------------------------- + + $ python3 -m venv .venv + $ source .venv/bin/activate + $ pip install --upgrade pip + $ pip install git+https://github.com/celery/django-celery-beat.git Downloading and installing from source -------------------------------------- @@ -16,13 +24,13 @@ http://pypi.python.org/pypi/django-celery-beat You can install it by doing the following,:: + $ python3 -m venv .venv + $ source .venv/bin/activate + $ pip install --upgrade build pip $ tar xvfz django-celery-beat-0.0.0.tar.gz $ cd django-celery-beat-0.0.0 - $ python setup.py build - # python setup.py install - -The last command must be executed as a privileged user if -you are not currently using a virtualenv. + $ python -m build + $ pip install . Using the development version ----------------------------- diff --git a/t/unit/conftest.py b/t/unit/conftest.py index a4f34c7e..ef133f2a 100644 --- a/t/unit/conftest.py +++ b/t/unit/conftest.py @@ -2,7 +2,7 @@ import pytest # we have to import the pytest plugin fixtures here, -# in case user did not do the `python setup.py develop` yet, +# in case user did not yet `pip install ".[develop]"`, # that installs the pytest plugin into the setuptools registry. from celery.contrib.pytest import (celery_app, celery_config, celery_enable_logging, celery_parameters,