From c4b068cfd3885a5a34a26fca293987b861526a66 Mon Sep 17 00:00:00 2001 From: Ryan P Kilby Date: Fri, 24 Aug 2018 15:57:45 -0700 Subject: [PATCH 1/2] Fix dist build (#6139) * Use tox-venv to reduce warnings in output * Remove .egg-info/ to allow wheel installation tox now invokes pip as a python module instead of through its entry point. "python -m" adds the current directory to the PYTHONPATH, picking up the .egg-info/ metadata directory, tricking pip into thinking that the package is already installed (and thus not installing the wheel). Deleting the metadata directory fixes this. --- .travis.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 76adf1a60..b8c5b385c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -29,6 +29,7 @@ matrix: env: TOXENV=dist script: - python setup.py bdist_wheel + - rm -r djangorestframework.egg-info # see #6139 - tox --installpkg ./dist/djangorestframework-*.whl - tox # test sdist @@ -44,7 +45,7 @@ matrix: - env: DJANGO=2.1 install: - - pip install tox tox-travis + - pip install tox tox-venv tox-travis script: - tox From 468cdd16edabbb327c7dde877f3b0a18bea082b9 Mon Sep 17 00:00:00 2001 From: Jon Dufresne Date: Tue, 28 Aug 2018 00:51:28 -0700 Subject: [PATCH 2/2] Remove unnecessary models.py file (#6142) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Since Django 1.7, an empty models.py file is not required. See https://docs.djangoproject.com/en/dev/releases/1.7/#app-loading-refactor > It is possible to omit models.py entirely if an application doesn’t > have any models. --- rest_framework/models.py | 1 - 1 file changed, 1 deletion(-) delete mode 100644 rest_framework/models.py diff --git a/rest_framework/models.py b/rest_framework/models.py deleted file mode 100644 index 5b53a5264..000000000 --- a/rest_framework/models.py +++ /dev/null @@ -1 +0,0 @@ -# Just to keep things like ./manage.py test happy