Skip to content

Commit

Permalink
Merge pull request #5447 from benjaoming/rm-django-dist
Browse files Browse the repository at this point in the history
Remove redundant Django-1.5.12-py2.7.egg-info
  • Loading branch information
benjaoming committed Apr 14, 2017
2 parents 150cb9b + 5a42cbb commit 0786c8c
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 9 deletions.
6 changes: 2 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ clean-build:
rm -fr dist/
rm -rf .kalite_dist_tmp
rm -fr .eggs/
rm -fr dist-packages/
rm -fr dist-packages-temp/
rm -fr .pip-temp/
rm -fr kalite/database/templates
rm -fr kalite/static-libraries/docs
find kalite/packages/dist/* -maxdepth 0 -type d -exec rm -fr {} +
find . -name '*.egg-info' -exec rm -fr {} +
find . -name '*.egg' -exec rm -f {} +

Expand Down Expand Up @@ -106,9 +106,7 @@ sdist: clean docs assets
python setup.py sdist --formats=$(format) --static

dist: clean docs assets
# python setup.py sdist --formats=$(format)
python setup.py bdist_wheel
# python setup.py sdist --formats=$(format) --static
python setup.py bdist_wheel --static # --no-clean
ls -l dist

Expand Down
1 change: 1 addition & 0 deletions docs/installguide/release_notes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ Bug fixes
* Do not load video into memory to check its size, just use disk stats :url-issue:`2909`
* Print server address after ``kalite start`` :url-issue:`5441`
* Log everything from automatic initialization in ``kalite start`` and ``kalite manage setup`` :url-issue:`5408`
* Remove unused Django package installed in ``kalite/packages/dist`` :url-issue:`5419`

Known issues
^^^^^^^^^^^^
Expand Down
3 changes: 2 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
# https://github.com/django/django/blob/master/tests/staticfiles_tests/apps/test/static/test/%E2%8A%97.txt
# ...to explain: Some of the below packages depend on django, if we don't
# specify a version here, we'll get the latest.
django<1.6
# See also: https://github.com/learningequality/ka-lite/issues/5419
django==1.5.12

docopt>=0.6,<0.7
South==1.0.2
Expand Down
1 change: 1 addition & 0 deletions requirements_dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ django-extensions==1.5.9 # Found in installed apps in kalite.project.settings.d
sqlparse<0.2
pep8
sphinx
sphinx_rtd_theme
#cli2man
polib # used for our own makemessages
xlrd # used for management command convert_xls_to_items
12 changes: 8 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,7 @@ def install_distributions(distributions):
opts.build_dir = STATIC_DIST_PACKAGES_TEMP
opts.download_cache = STATIC_DIST_PACKAGES_DOWNLOAD_CACHE
opts.isolated = True
opts.ignore_installed = True
opts.compile = False
opts.ignore_dependencies = False
# This is deprecated and will disappear in Pip 10
Expand All @@ -247,14 +248,17 @@ def install_distributions(distributions):
# opts.no_binary = ':all:' # Do not use any binary files (whl)
opts.no_clean = NO_CLEAN
command.run(opts, distributions)
# requirement_set.source_dir = STATIC_DIST_PACKAGES_TEMP
# requirement_set.install(opts)

# Install requirements into kalite/packages/dist
if DIST_BUILDING_COMMAND:
install_distributions(RAW_REQUIREMENTS)
# Now remove Django because it's bundled
shutil.rmtree(os.path.join(STATIC_DIST_PACKAGES, "django"))

# Now remove Django because it's bundled. It gets installed as an egg
# so unfortunately, the path is a bit dependent on the specific
# version installed (we pinned it for reliability in requirements.txt)
shutil.rmtree(
os.path.join(STATIC_DIST_PACKAGES, "Django-1.5.12-py2.7.egg-info"),
)

# It's not a build command with --static or it's not a build command at all
else:
Expand Down

0 comments on commit 0786c8c

Please sign in to comment.