Skip to content

Commit

Permalink
Remove redundant kalite/packages/dist/Django-1.5.12-py2.7.egg-info le…
Browse files Browse the repository at this point in the history
  • Loading branch information
Benjamin Bach committed Apr 14, 2017
1 parent feecde0 commit b1b1b81
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 10 deletions.
6 changes: 2 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ clean-build:
rm -fr dist/
rm -rf .kalite_dist_tmp
rm -fr .eggs/
rm -fr dist-packages/
rm -fr dist-packages-temp/
rm -fr kalite/packages/dist/*
rm -fr .pip-temp/
rm -fr kalite/database/templates
rm -fr kalite/static-libraries/docs
find . -name '*.egg-info' -exec rm -fr {} +
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: 0 additions & 1 deletion kalite/packages/dist/__init__.py

This file was deleted.

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
13 changes: 9 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,18 @@ 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"),
ignore_errors=False
)

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

0 comments on commit b1b1b81

Please sign in to comment.