[Distutils] Buoldout2 e setup.py: install_requires ignored
Leonardo Rochael Almeida
leorochael at gmail.com
Tue Sep 13 16:48:33 EDT 2016
Hi Sandro,
I don't know what your previous setup did, but in your current setup, your
`buildout.cfg` is not configured to take your `setup.py` into account in
any way.
In the `eggs` setting, only `django`, `ipython` and `django-settings` are
mentioned. To take your `setup.py` into account it should mention your
package by name as well (by the way, please consider using a name that
doesn't contain spaces, instead of "example with buildout2".
E.g. assuming you rename your package to "mypackage" in `setup.py`, and
this `setup.py` is in the root of your buildout, the following
`buildout.cfg` should install your package and its `install_requires`:
[buildout]
parts = django
develop = .
eggs =
mypackage
django
ipython
django_extensions
project-name = mytest
[django]
recipe = djangorecipe
settings = settings
eggs = ${buildout:eggs}
On 13 September 2016 at 17:07, Alessandro Dentella <sandro at e-den.it> wrote:
> Hi,
>
>
> I just migrated from buildout 1.7 to buildout 2.5. In this migration I
> stopped using a recipe that created a virtualenv as a part of
> buildout and I now use an external (basic) virtualenv to calll
> bootrap, so I can't compare the two configuration in a strict way.
>
> My problem is that now it seems that install_requires declared in
> setup.py are simply ignored, while all packages declared in the eggs
> directory are used/installed along with all the packages they depends
> on.
>
> I can't find what's wrong with my configuration, I report below a
> minimal setup that shows the problem.
>
> thanks in advance for any hints
>
> sandro
> *:-)
>
> sandro at bluff:/tmp/new$ cat buildout.cfg
> [buildout]
> parts = django
> eggs = django
> ipython
> django_extensions
> project-name = mytest
>
> [django]
> recipe = djangorecipe
> settings = settings
> eggs = ${buildout:eggs}
>
> ----------------------------------------------------
> sandro at bluff:/tmp/new$ cat setup.py
> from setuptools import setup, find_packages
>
> setup(
> name = "example with buildout2",
> version = "0.1",
> author = "Sandro",
> author_email = "sandro at e-den.it",
> description = ("Sperem ghe la vaga ben"),
> license = "BSD",
> url = "http://hg.trepalchi.it/",
> #packages=['an_example_pypi_project', 'tests'],
> long_description="Bla bla",
> classifiers=[
> "Development Status :: 3 - Alpha",
> "Topic :: Utilities",
> "License :: OSI Approved :: BSD License",
> ],
> install_requires=[
> 'pyquery',
> ]
> )
>
>
> The steps I do::
>
> mkvirtualenv -p /usr/bin/python3 base3
> /home/sandro/.virtualenvs/base3/bin/python3 bootstrap.py
> ./bin/buildout
>
> And I obtain bin/django where pyquery **is missing**
>
> $ cat bin/django
> #!/home/sandro/.virtualenvs/base3/bin/python3
>
> import sys
> sys.path[0:0] = [
> '/home/sandro/.buildout/eggs/Django-1.10.1-py3.5.egg',
> '/home/sandro/.buildout/eggs/ipython-5.0.0-py3.5.egg',
> '/home/sandro/.buildout/eggs/djangorecipe-2.2.1-py3.5.egg',
> '/home/sandro/.buildout/eggs/zc.recipe.egg-2.0.3-py3.5.egg',
> '/home/sandro/.buildout/eggs/zc.buildout-2.5.3-py3.5.egg',
> '/home/sandro/.buildout/eggs/pexpect-4.2.1-py3.5.egg',
> '/home/sandro/.buildout/eggs/Pygments-2.1.3-py3.5.egg',
> '/home/sandro/.buildout/eggs/prompt_toolkit-1.0.7-py3.5.egg',
> '/home/sandro/.buildout/eggs/traitlets-4.2.2-py3.5.egg',
> '/home/sandro/.buildout/eggs/simplegeneric-0.8.1-py3.5.egg',
> '/home/sandro/.buildout/eggs/pickleshare-0.7.4-py3.5.egg',
> '/home/sandro/.buildout/eggs/decorator-4.0.10-py3.5.egg',
> '/home/sandro/.buildout/eggs/setuptools-27.1.2-py3.5.egg',
> '/home/sandro/.buildout/eggs/ptyprocess-0.5.1-py3.5.egg',
> '/home/sandro/.buildout/eggs/wcwidth-0.1.7-py3.5.egg',
> '/home/sandro/.buildout/eggs/six-1.10.0-py3.5.egg',
> '/home/sandro/.buildout/eggs/ipython_genutils-0.1.0-py3.5.egg',
> '/tmp/new',
> ]
>
> import djangorecipe.binscripts
>
> if __name__ == '__main__':
> sys.exit(djangorecipe.binscripts.manage('project.settings'))
>
>
>
> --
> Sandro Dentella *:-)
> http://trepalchi.it Il portale degli artisti
>
> http://www.reteisi.org Soluzioni libere per le scuole
> http://sqlkit.argolinux.org SQLkit home page -
> PyGTK/python/sqlalchemy
> _______________________________________________
> Distutils-SIG maillist - Distutils-SIG at python.org
> https://mail.python.org/mailman/listinfo/distutils-sig
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/distutils-sig/attachments/20160913/f49d16ee/attachment-0001.html>
More information about the Distutils-SIG
mailing list