Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for #4752 until current tastypie master is released #4761

Merged
merged 1 commit into from
Dec 19, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
where_am_i = os.path.dirname(os.path.realpath(__file__))

# Handle requirements
raw_requirements = open(os.path.join(where_am_i, 'requirements.txt'), 'r').read().split("\n")
RAW_REQUIREMENTS = open(os.path.join(where_am_i, 'requirements.txt'), 'r').read().split("\n")

def filter_requirement_statements(req):
"""Filter comments and blank lines from a requirements.txt like file
Expand All @@ -46,13 +46,13 @@ def filter_requirement_statements(req):


# Filter out comments from requirements
raw_requirements = map(filter_requirement_statements, raw_requirements)
raw_requirements = filter(lambda x: bool(x), raw_requirements)
RAW_REQUIREMENTS = map(filter_requirement_statements, RAW_REQUIREMENTS)
RAW_REQUIREMENTS = filter(lambda x: bool(x), RAW_REQUIREMENTS)

# Special parser for http://blah#egg=asdasd-1.2.3
DIST_REQUIREMENTS = []
DEPENDENCY_LINKS = []
for req in raw_requirements:
for req in RAW_REQUIREMENTS:
if req.startswith("https://"):
DEPENDENCY_LINKS.append(req)
__, req = req.split("#egg=")
Expand Down Expand Up @@ -298,13 +298,17 @@ def install_distributions(distributions):
opts.ignore_dependencies = True
opts.use_wheel = False
opts.no_clean = False
# Hotfix for the one single tastypie dependency link. Not nice.
# To be removed as soon as an upstream tastypie fixes our
# Django 1.5 issue
opts.process_dependency_links = True
command.run(opts, distributions)
# requirement_set.source_dir = STATIC_DIST_PACKAGES_TEMP
# requirement_set.install(opts)

# Install requirements into dist-packages
if DIST_BUILDING_COMMAND:
install_distributions(STATIC_REQUIREMENTS)
install_distributions(RAW_REQUIREMENTS)

# Empty the requirements.txt file

Expand Down