Skip to content

Respect installing project in virtualenv in builder #1576

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

Merged
merged 1 commit into from
Aug 20, 2015
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion readthedocs/projects/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ class Project(models.Model):
skip = models.BooleanField(_('Skip'), default=False)
mirror = models.BooleanField(_('Mirror'), default=False)
use_virtualenv = models.BooleanField(
_('Use virtualenv'),
_('Install Project'),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please keep in mind that changing any field argument will require adjustments in the migrations:
screen1
(See the "Alter field use_virtualenv on project")

I usually go the way to change the verbose_name of the original migration which introduced the field since I'm 100% sure that this change will not affect the DB. The other probably cleaner solution (which is causing other problems when using many long lived feature branches) is to create a new migration that changes the field.

help_text=_("Install your project inside a virtualenv using <code>setup.py "
"install</code>"),
default=False
Expand Down
2 changes: 1 addition & 1 deletion readthedocs/projects/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ def setup_environment(self):
# Handle setup.py
checkout_path = self.project.checkout_path(self.version.slug)
setup_path = os.path.join(checkout_path, 'setup.py')
if os.path.isfile(setup_path):
if os.path.isfile(setup_path) and self.project.use_virtualenv:
if getattr(settings, 'USE_PIP_INSTALL', False):
self.build_env.run(
'python',
Expand Down