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

Test (and develop) command should use package built in "build" directory rather than in place #266

Open
ghost opened this issue Oct 8, 2014 · 0 comments
Labels
enhancement major Needs Triage Issues that need to be evaluated for severity and status.

Comments

@ghost
Copy link

ghost commented Oct 8, 2014

Originally reported by: callegar (Bitbucket: callegar, GitHub: callegar)


When using the test command, a setup script using setuptools builds the package in place and then runs the test from there. In fact, this is documented:

python setup.py --help-commands
  ...
test              run unit tests after in-place build
  ...

However, this has a few issues:

  • It is inconsistent with the build, install, bdist commands, that build in a subdirectory of the build directory named after the system architecture and python version, for instance build/lib.linux-x86_64-2.7.
  • It is inefficient, because after you build, you end up building again in-place for testing. For packages with a lot of C or Cython extensions, this can waste a significant amount of time.

Most important:

  • It is troublesome when you have a home directory that is shared among multiple machines with different architectures. For instance suppose that you have a 32 bit (i386) and a 64 bit (x86_64) systems with a shared home. When you move from one system to another, you end up with your project directory containing binary files that make no sense in your architecture and that can cause issues. The same happens if you have your project directory in an area that is synched by services like unison, dropbox, owncloud, etc. among different systems. As a matter of fact, the main reason for having a separate build directory is not keeping the source tree tidy, but nicely handling multiple platforms/architectures. Unfortunately, this is correctly provided for the build, bdist and install commands but then suddently broken for test (and probably develop).

I do not think that I can mark the current behavior as a bug, since in the end it is the documented behavior. Hence, I am marking it as an enhancement. But still I think that it is problematic and that it should be fixed.


@pganssle pganssle added the Needs Triage Issues that need to be evaluated for severity and status. label Oct 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement major Needs Triage Issues that need to be evaluated for severity and status.
Projects
None yet
Development

No branches or pull requests

1 participant