Giter VIP home page Giter VIP logo

Comments (7)

reinout avatar reinout commented on July 22, 2024

zest.releaser requires setuptools in its setup.py. My assumption is that you have setuptools installed globally (else, how did you install zest.releaser?) OR that you installed it into some virtualenv or buildout. In both cases, I'd expect setuptools to be available when using sys.executable.

But apparently I'm mistaken! It could very well be that it works just fine with virtualenv (which seems to be having a harder link to its own custom local python than buildout).

Do you have any idea how we could solve this?

from zest.releaser.

benoit-intrw avatar benoit-intrw commented on July 22, 2024

The fullrelease entry point in buildout bin/ directory look like this (I’ve removed all other dependencies):

#!/usr/bin/python2.7

import sys
sys.path[0:0] = [
    '/home/xxxxx/.buildout/eggs/zest.releaser-3.37-py2.7.egg',
    '/home/xxxxx/.buildout/eggs/distribute-0.6.28-py2.7.egg',
    ]


import zest.releaser.fullrelease

if __name__ == '__main__':
    zest.releaser.fullrelease.main()

So with sys.executable you get the right python binary but lost the paths.

I agree with you that a pythonist machine without setuptools installed is quite rare :)
But we got the case.

I've not tried it but a solution could be to update PYTHONPATH environment variable with paths from sys.path. That's seems possible with http://docs.python.org/library/os.html#os.putenv but looks tricky.

from zest.releaser.

woutervh avatar woutervh commented on July 22, 2024

I'm also bitten by this

  • barebones python without setuptools (deliberate)
  • buildout pulls in its own setuptools to avoid conflicts between buildouts regarding setuptools-versions
  • zest-releaser installed in a separate virtualenv of buildout

updating PYTHONPATH and appending the path to zestreleaser's setuptools-path seems OK

from zest.releaser.

mauritsvanrees avatar mauritsvanrees commented on July 22, 2024

A few years ago I gave this a shot in the maurits-add-syspath branch, basically changing the setup.py calls to: PYTHONPATH=...... python setup.py. I think it did not seem needed then, or it looked to dangerous/crazy.

Let's try it again, in basically the same way. See branch maurits-issue-24.

from zest.releaser.

mauritsvanrees avatar mauritsvanrees commented on July 22, 2024

BTW, a workaround for the user would be to create a virtualenv or buildout or whatever with a setuptools installed and add the directory containing that python executable to the path when calling fullrelease or release:

  PATH=/path/to/working/python/bin:$PATH fullrelease

If you make this a small bash script or an alias and give that the name fullrelease, all should work fine without you needing to remember to add that PATH.

from zest.releaser.

reinout avatar reinout commented on July 22, 2024

I just released 3.51 with the fix by @mauritsvanrees . @woutervh, could you try that one?

(If it is still a problem, re-open the ticket :-) )

from zest.releaser.

woutervh avatar woutervh commented on July 22, 2024

Confirmed that the fix is working.

from zest.releaser.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.