Skip to content

Commit

Permalink
Running setup.py directly is deprecated
Browse files Browse the repository at this point in the history
  • Loading branch information
cclauss committed Feb 22, 2024
1 parent cd41f68 commit 672a395
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 15 deletions.
13 changes: 6 additions & 7 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,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
--------------------------------------
Expand All @@ -265,14 +265,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:

Expand Down
3 changes: 2 additions & 1 deletion docker/base/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -19,7 +20,7 @@ COPY requirements/ /app/requirements/

WORKDIR /app

RUN python3 setup.py develop --user
RUN pip3 install --editable --user ".[develop]"


WORKDIR /
Expand Down
20 changes: 14 additions & 6 deletions docs/includes/installation.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
--------------------------------------
Expand All @@ -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
-----------------------------
Expand Down
2 changes: 1 addition & 1 deletion t/unit/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 672a395

Please sign in to comment.