Skip to content
This repository was archived by the owner on Mar 3, 2023. It is now read-only.

Add a better python checker#2426

Closed
avdg wants to merge 5 commits intoatom:masterfrom
avdg:pythonCheck
Closed

Add a better python checker#2426
avdg wants to merge 5 commits intoatom:masterfrom
avdg:pythonCheck

Conversation

@avdg
Copy link
Contributor

@avdg avdg commented May 28, 2014

No description provided.

@avdg
Copy link
Contributor Author

avdg commented May 28, 2014

Will still add some better error messages... more commits comming soon

@avdg
Copy link
Contributor Author

avdg commented May 28, 2014

I guess I'm done now...

@winstliu
Copy link
Contributor

Note-it should be "install", not "installed".

@avdg
Copy link
Contributor Author

avdg commented May 28, 2014

Done

@jrsconfitto
Copy link
Contributor

i suggest moving the which file either to the utils or the vendor folders instead of creating a new folder for it. The maintainers might have other ideas of what that should go, though.

Thanks for doing this 😃!

script/bootstrap Outdated
Copy link
Contributor

Choose a reason for hiding this comment

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

i'm not sure that following this instruction will work correctly. Maybe it could echo some of the other instructions instead.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, that was the original message.

@avdg
Copy link
Contributor Author

avdg commented May 29, 2014

Pls take a look at the path... I guess its already in a new vendor directory.

I didn't feel like putting it in the utils directory because the file isn't executable (compared to the others)

avdg@bb83fa5

Copy link
Contributor

Choose a reason for hiding this comment

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

Should we remove this? I'm guessing it will always fail.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We could, though I prefer to keep the file as it was originally. I don't want to end up in a situation where we don't know what was patches and what was not.

Copy link
Contributor

Choose a reason for hiding this comment

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

Hm, i disagree. Git is great for keeping track of what was patched!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Can't disagree. I'll just comment it out.

@jrsconfitto
Copy link
Contributor

ah, i was thinking about using the vendor folder that already exists at the root... but i think the atom people would have a better idea of where to put that.

@avdg
Copy link
Contributor Author

avdg commented May 29, 2014

That can always be done later.

@probablycorey
Copy link

This is a good start, but I think we can simplify it bit. I'd like to avoid vendoring the which module if possible. We have been actively trying to remove all vendor dependencies because it makes it hard keep things up-to-date.

Also, with this change the majority of the bootstrap file is now devoted to testing for python. I think it would be better to put these in another file that exports a method named something like 'verifyRequirements`.

We really only need a subset of the checkPythonVersion method and the guessPython method.

@avdg
Copy link
Contributor Author

avdg commented May 29, 2014

This is a good start, but I think we can simplify it bit. I'd like to avoid vendoring the which module
if possible. We have been actively trying to remove all vendor dependencies because it makes it
hard keep things up-to-date.

I understand that maintaining vendor files can be a pain, even with a fairly stable library it still steals some focus which we could use elsewhere.

The best alternative I know so far is to move the which library as npm package, but that would require the checks to be executed after installing the npm packages. Though I welcome other suggestions.

Also, with this change the majority of the bootstrap file is now devoted to testing for python. I think it would be better to put these in another file that exports a method named something like 'verifyRequirements`.

Just an idea... lets move the python checker in the script/utils folder and let it be a script on its own...

Edit: maybe its not a good idea to make it its own script. Npm dependencies... (if we do the thing above)

We really only need a subset of the checkPythonVersion method and the guessPython method.

I'm pretty sure we'll end up with a total modified version of nody-gyp's original source code. I'll sure remove the commented log function.

Edit: also, which part of the code do you want to keep?

@avdg
Copy link
Contributor Author

avdg commented May 30, 2014

Squashing some small commits. The original could be found here https://github.com/avdg/atom/compare/pythonCheckOld, but anyway, lets focus on getting stuff done instead of caring about the small stuff or making it bling bling.

My main focus was to fix the current error caused by the python checkerwhich was too strict on windows. Though this pr will also check python under osx and linux and add a vendor file, which luckily seems stable though it still is a vendor file (with ofcourse requiring maintenance).

The discussion can go on, but I guess we are better off with the current code than what is available upstream.

@probablycorey
Copy link

@avdg what do you think about #2457.

The main goal is to error when users don't have Python27 installed, but allow people with Python27 installed in non-default locations a way to get around the error. My hope is that this will fix a majority of the windows build issues without having to match node-gyp's dependency code.

@probablycorey probablycorey self-assigned this May 30, 2014
@avdg
Copy link
Contributor Author

avdg commented May 30, 2014

Saw it, and commented it.

@avdg
Copy link
Contributor Author

avdg commented May 30, 2014

Anyway... to match requirements I will eventually move some code to verify-requirements.

I hope to get it up tomorrow

@avdg
Copy link
Contributor Author

avdg commented May 30, 2014

Also, with this change the majority of the bootstrap file is now devoted to testing for python. I think it would be better to put these in another file that exports a method named something like 'verifyRequirements`.

@probablycorey The patch made me make sense of this. Also relooked the utils/ folder and found other js files. So its not a exectuble-only folder. Thanks!

@avdg
Copy link
Contributor Author

avdg commented May 31, 2014

Please test.

@probablycorey
Copy link

Thanks for your help on this @avdg. I'm going to close this and move the conversation over to #2457

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants