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

Fixes #1317 - install packages in virtualenv #1322

Merged
merged 2 commits into from
Feb 6, 2017
Merged

Conversation

zoepage
Copy link
Member

@zoepage zoepage commented Feb 2, 2017

The issue #1317 was caused by non-installed packages in the virtualenv.
It seems it's not clearly described for a new contributor in the contribute.md and as we have the scripts anyway, it should be added to the npm run virtualenv. The install will be skipped when the packages are found.

@miketaylr @karlcow could you please confirm? Thanks :)

Copy link
Member

@miketaylr miketaylr left a comment

Choose a reason for hiding this comment

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

Hmm, I'm gonna try to repro #1317, then come back to this.

package.json Outdated
@@ -45,7 +45,7 @@
"build": "grunt",
"module": "git submodule init && git submodule update",
"start": "source env/bin/activate && python run.py",
"virtualenv" : "pip install virtualenv && virtualenv env && source env/bin/activate",
"virtualenv" : "pip install virtualenv && virtualenv env && npm run pip && source env/bin/activate",

This comment was marked as abuse.

This comment was marked as abuse.

@miketaylr
Copy link
Member

So, I can repro #1317. I think there's something wrong with npm run virtualenv -- it installs everything, but fails to activate the virtualenv.

I wonder why...

@karlcow
Copy link
Member

karlcow commented Feb 2, 2017

is there any reasons why some of us are using npm run for things which are just python related. Asking because I might miss something.

fwiw my process is always:

workon webcompatcom #this activates the virtualenv through virtualenvwrapper, but it's the same as just doing virtualenv mostly
# git stuff
# edit
# more git stuff
grunt # only if I touched the JS/CSS
python run.py

@miketaylr
Copy link
Member

is there any reasons why some of us are npm run for things which are just python related. Asking because I might miss something.

It's a good question. I think the idea was to have an "EZ setup", or a single command to do all the dirty work. In theory npm scripts are just running bash scripts, so it's like a diet Makefile.

My workflow is exactly the same as @karlcow's, FWIW. But I only run grunt if I change branches (and suspect style changed) or touch CSS (I have eslint integrated into sublime, so I skip the grunt eslint task).

@magsout
Copy link
Member

magsout commented Feb 3, 2017

@karlcow The only reason is to abstract the commands for the installation of the project. We don't care how many recipes we have for python, js tools etc...

One ring (recipes) to rule them all ? 😜

@zoepage zoepage changed the title Issue #1317 - install packages in virtualenv Fix #1317 - install packages in virtualenv Feb 4, 2017
@zoepage zoepage changed the title Fix #1317 - install packages in virtualenv Fixes #1317 - install packages in virtualenv Feb 4, 2017
@@ -40,12 +40,12 @@
"suitcss-utils-display": "^0.4.0"
},
"scripts": {
"init": "npm run module && npm run virtualenv && npm run pip && npm install && npm run config",
"setup": "npm run module && npm run virtualenv && npm install && npm run config",

This comment was marked as abuse.

This comment was marked as abuse.

This comment was marked as abuse.

This comment was marked as abuse.

@miketaylr
Copy link
Member

LGTM, thanks @zoepage!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants