Giter Club home page Giter Club logo

Comments (11)

asmeurer avatar asmeurer commented on June 9, 2024

It imports a file ez_setup from the same directory as setup.py. See https://github.com/opencobra/cobrapy.

from conda-build.

asmeurer avatar asmeurer commented on June 9, 2024

Now that branch does

$conda skeleton pypi cobra
Using url https://pypi.python.org/packages/source/c/cobra/cobra-0.2.1.tar.gz (1719270) for cobra.
Downloading cobra (use --no-download to skip this step)
Using cached download
Unpacking cobra...
done
working in /var/folders/yc/8wpl9rlx47qgzxqpcf003k280000gn/T/tmph2ujsxconda_skeleton
Traceback (most recent call last):
  File "setup.py", line 49, in <module>
    import ez_setup
ImportError: No module named 'ez_setup'
Traceback (most recent call last):
  File "/Users/aaronmeurer/anaconda/bin/conda-skeleton", line 12, in <module>
    exec(compile(open(__file__).read(), __file__, 'exec'))
  File "/Users/aaronmeurer/Documents/Continuum/conda-build/bin/conda-skeleton", line 5, in <module>
    sys.exit(main())
  File "/Users/aaronmeurer/Documents/Continuum/conda-build/conda_build/main_skeleton.py", line 79, in main
    args.func(args, p)
  File "/Users/aaronmeurer/Documents/Continuum/conda-build/conda_build/main_skeleton.py", line 86, in execute
    pypi.main(args, parser)
  File "/Users/aaronmeurer/Documents/Continuum/conda-build/conda_build/pypi.py", line 284, in main
    with open(join(tempdir, 'pkginfo.yaml'), encoding='utf-8') as fn:
FileNotFoundError: [Errno 2] No such file or directory: '/var/folders/yc/8wpl9rlx47qgzxqpcf003k280000gn/T/tmph2ujsxconda_skeleton/pkginfo.yaml'

which probably means it isn't failing correctly. @dan-blanchard

from conda-build.

dan-blanchard avatar dan-blanchard commented on June 9, 2024

Yeah, the temporary directory gets wiped out when the first part crashes, so then you get that additional FileNotFound error.

I'm not sure why ez_setup can't be imported, because we explicitly add the source directory to the PYTHONPATH before creating the new python process.

from conda-build.

asmeurer avatar asmeurer commented on June 9, 2024

It should just bail if the subprocess returns nonzero I guess. That will fail if someone writes something stupid in their setup.py that exists nonzero on success, though (believe me, people do a lot of stupid things in setup.py; at this point, probably 90% of conda skeleton pypi failures are due to people doing something odd and unexpected in setup.py).

from conda-build.

dan-blanchard avatar dan-blanchard commented on June 9, 2024

Okay, it now does that.

from conda-build.

dan-blanchard avatar dan-blanchard commented on June 9, 2024

So the issue is that they forgot to put ez_setup.py in their MANIFEST. It's not in the tarball from PyPI.

from conda-build.

asmeurer avatar asmeurer commented on June 9, 2024

Ah, so we should support ez_setup. I installed it and was able to make the recipe, but it wasn't right. For one thing, it didn't depend on ez_setup. Also, ez_setup has its own downloading stuff that isn't patched around like the one in the Anaconda setuptools.

from conda-build.

dan-blanchard avatar dan-blanchard commented on June 9, 2024

Yeah, ez_setup is kind of a mess. I think the most straightforward way to handle it would be to try to remove any references to ez_setup from setup.py if we see them, since it's whole purpose is to download setuptools, which we have a conda package for.

from conda-build.

aebrahim avatar aebrahim commented on June 9, 2024

FWIW cobra no longer uses ez_setup.py, so this can probably be closed.

from conda-build.

msarahan avatar msarahan commented on June 9, 2024

works today. Closing

from conda-build.

github-actions avatar github-actions commented on June 9, 2024

Hi there, thank you for your contribution!

This issue has been automatically locked because it has not had recent activity after being closed.

Please open a new issue if needed.

Thanks!

from conda-build.

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.