Skip to content

FileNotFoundError doesn't exist (in python?)#332

Merged
arcivanov merged 1 commit intopybuilder:masterfrom
esc:fix/generated_setup.py
Mar 10, 2016
Merged

FileNotFoundError doesn't exist (in python?)#332
arcivanov merged 1 commit intopybuilder:masterfrom
esc:fix/generated_setup.py

Conversation

@esc
Copy link
Copy Markdown
Contributor

@esc esc commented Feb 11, 2016

The setup.py generated is buggy, apparently:

Scout24/afp-cli#57

@esc
Copy link
Copy Markdown
Contributor Author

esc commented Feb 11, 2016

This fixed Scout24/afp-cli#57

@arcivanov
Copy link
Copy Markdown
Member

This is Python 3 vs Python 2 issue: https://docs.python.org/3/library/exceptions.html - FileNotFoundError very much exists in 3

@arcivanov
Copy link
Copy Markdown
Member

This PR would also need to update PyBuilder's own setup.py in the root of the repo

@esc
Copy link
Copy Markdown
Contributor Author

esc commented Feb 18, 2016

I have made the damn thing python2 and python3 compatible, ideas for testing anyone?

@esc
Copy link
Copy Markdown
Contributor Author

esc commented Feb 18, 2016

The basic idea is to alias FileNotFoundError to OSerror when in python2 and then to check the errno also. I have tried it manually in 2.7 and 3.5 and it appears to be working.

@mriehl
Copy link
Copy Markdown
Member

mriehl commented Mar 10, 2016

@esc can you update the local setup.py? I'll merge then. Fix looks good (well not good, but practical)

@esc
Copy link
Copy Markdown
Contributor Author

esc commented Mar 10, 2016

@mriehl am on the case

@esc
Copy link
Copy Markdown
Contributor Author

esc commented Mar 10, 2016

@mriehl done, please merge when green

Comment thread setup.py Outdated
sys.exit(e.returncode)

try:
subprocess.check_call(["pyb", "clean", "install_build_dependencies", "package", "-o"])
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

👎
PyB is not available when building PYB

@arcivanov
Copy link
Copy Markdown
Member

setup.py for PyB assumes that PyB is available, which is not the case.

@esc
Copy link
Copy Markdown
Contributor Author

esc commented Mar 10, 2016

Okay so solution is to remove the pybuilder installation part?

@esc
Copy link
Copy Markdown
Contributor Author

esc commented Mar 10, 2016

then we don't need the py2/3 capabilitity for this setup.py?

@esc
Copy link
Copy Markdown
Contributor Author

esc commented Mar 10, 2016

Should I just revert the latest commit?

@esc
Copy link
Copy Markdown
Contributor Author

esc commented Mar 10, 2016

Oh wait no, it needs to check if build.py is available?

@esc
Copy link
Copy Markdown
Contributor Author

esc commented Mar 10, 2016

Sorry, confused, now back to thinking that the setup.py does not need to be changed.

@arcivanov
Copy link
Copy Markdown
Member

I just looked at setup.py and it doesn't use FileNotFoundError, so you're right, it doesn't have to be changed at all as it's not affected.

@esc
Copy link
Copy Markdown
Contributor Author

esc commented Mar 10, 2016

Okay, I have reverted the commit, feel free to merge or ask for rebase.

@arcivanov
Copy link
Copy Markdown
Member

A rebase would be nice :) @esc

@esc
Copy link
Copy Markdown
Contributor Author

esc commented Mar 10, 2016

done

arcivanov added a commit that referenced this pull request Mar 10, 2016
FileNotFoundError doesn't exist (in python?)
@arcivanov arcivanov merged commit 231f630 into pybuilder:master Mar 10, 2016
@esc esc deleted the fix/generated_setup.py branch June 10, 2016 11:33
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.

3 participants