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

Feature Request: Create a warning if setuptools-X is not in path and VCS is X #4

Closed
do3cc opened this issue Feb 7, 2012 · 6 comments

Comments

@do3cc
Copy link

do3cc commented Feb 7, 2012

It would be nice if zest releaser would issue a warning if one is preparing a release with source code managed via X(e.g. git) and setuptools-x (eg. setuptools-git) is not installed.

This helps avoiding building eggs that miss most of the source code, because the setuptools magic does not know how to handle checked in files information for X(e.g. git)

@reinout
Copy link
Collaborator

reinout commented Mar 20, 2012

a) Sorry for not replying earlier (see http://reinout.vanrees.org/weblog/2012/03/20/github-email-notifications.html for the reason...)

b) You even need such a setuptools-x for the latest subversion now as the .svn layout changed again.

c) The best solution is to just add a MANIFEST.in. The latest zest.releaser suggests such a file to you if you miss it, precisely because even svn starts acting up now. The suggested MANIFEST.in should fit most usecases, so it is not as scary as it was a couple of years ago.

So I'm leaning to not warning about setuptools-x, but we could theoretically add an "...or install setuptools-git" message to our MANIFEST.in suggestion. And suppress the warning if setuptools-git is installed.

What's your opinion?

And Maurits (co-author), what do you think?

@mauritsvanrees
Copy link
Member

@do3cc Does the above change sound good?

@do3cc
Copy link
Author

do3cc commented Mar 20, 2012

Sounds good to me. Thanks!

@mauritsvanrees
Copy link
Member

I have released zest.releaser 3.34 today.

@do3cc
Copy link
Author

do3cc commented Apr 24, 2012

Hi,

today I saw an e-mail from Alex Grönholm, asking why setuptools-git is in my setup_requires. Before I answered him I wanted to verify my assumption that an egg with setuptools-git in setup_requires does NOT install setuptools-git when only installing the egg with easy_install or pip. Unfortunately it DOES install setuptools-git. That should not be needed on production systems. So I start to believe, the MANIFEST.in warning might be more appropriate.

@mauritsvanrees
Copy link
Member

Hi Patrick,

The MANIFEST.in warning/suggestion is what zest.releaser is doing currently, so I guess nothing needs changing here, unless you have suggestions for a better text in that suggestion.

Let me see if I can explain the difference between setup.requires and install_requires.

Packages in the setup_requires need to be available before the setup.py can be handled correctly. Theoretically, this may lead to a chicken and egg problem, where the setup_requires need to be installed before you can determine what the setup_requires are... This is one of the reasons why work is being done in core Python to move away from setup.py and towards a declarative setup.cfg.

When you easy_install a package:

  1. its source gets downloaded,
  2. easy_install reads the setup.py looking for setup_requires (or maybe it can also get some info from PyPI for this),
  3. it installs packages that are in the setup_requires list, and then
  4. it installs the install_requires and the package itself.

In a (Plone) buildout, when you add a package to the eggs of your instance, only the package and its install_requires end up in the created instance script. The setup_requires get installed 'somewhere', but not in the instance script. You see this with some ZopeSkel templates: when you have created such a package in src/my.package/ and you use this in a buildout, then a PasteScript egg and a few other eggs get installed within the src/my.package/ directory.

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

No branches or pull requests

3 participants