Git Product home page Git Product logo

Comments (5)

aphearin avatar aphearin commented on July 17, 2024 1

Yes, I definitely forgot that and surely that is needed. I haven't actually ever modified the MANIFEST.in file in halotools so I'll start paying closer attention to it now that the package has been restructured. Thanks for catching that.

Once I add that and I try again to do python -m build --sdist ., then pyproject.toml is indeed included in the build as it should be.

from halotools.

aphearin avatar aphearin commented on July 17, 2024 1

Well, yeah, my ignorance about what's going on under the hood in astropy-helpers reduces me to a noob for these aspects of halotools maintenance, so I see the sense in that suggestion. I manage a bunch of other libraries that are packaged with standard tooling without running into all this confusion. The only difference from those is all the cython used in halotools (I've since migrated to numba and JAX for performance-critical kernels). Anyway, I'd been hoping to postpone ripping off the bandaid until after getting this version out, but you're right that this is taking a lot of work as it is, so probably better to just get on with it.

from halotools.

pllim avatar pllim commented on July 17, 2024

I think you need to add pyproject.toml to your manifest at https://github.com/astropy/halotools/blob/master/MANIFEST.in

from halotools.

aphearin avatar aphearin commented on July 17, 2024

Ok so pyproject.toml is now included in MANIFEST. Also, separately, this line has been included in setup.cfg (mirroring what is done in astropy here. Without this additional new line, I was getting an error message related to package discovery. I am now able to successfully build without error messages. Progress!

Build method 1

$ python -m build --sdist .

  • I still notice that none of the cython compiles during this process.
  • Nonetheless, I am able to successfully build and run pip install -e .[test] without any errors.
  • When I run pytest, I still notice that none of the cython compiles, and I get a traceback with a ton of errors that concludes with:
 File "/Users/aphearin/work/repositories/python/halotools/dist/halotools-0.8/astropy_helpers/astropy_helpers/conftest.py", line 57, in pytest_unconfigure
    combined_cdata.write_file('.coverage.subprocess')
AAttributeError: 'CoverageData' object has no attribute 'write_file'

I tried running python setup.py test instead, since this is what I normally run when I do tests that are local to my machine. But I notice that setup.py is not included in MANIFEST.in so then there is no setup.py available within dist. Is this a problem?

Build method 2

$ python setup.py build sdist --format=gztar

Doing things this way, again the cython actually compiles, and now of course pyproject.toml is present when I build using the command above, expand the tarball, and cd into dist. Also, as before, setup.py is present when I build this way. And when I run the test suite:
$ python setup.py test

I get the following traceback:

/Users/aphearin/opt/miniconda3/envs/dstar/lib/python3.9/site-packages/pkg_resources/__init__.py:123: PkgResourcesDeprecationWarning: helpers-4.0.1 is an invalid version and will not be supported in a future release
  warnings.warn(
Traceback (most recent call last):
  File "/Users/aphearin/work/repositories/python/halotools/dist/halotools-0.8/setup.py", line 16, in <module>
    from astropy_helpers.setup_helpers import setup
ImportError: cannot import name 'setup' from 'astropy_helpers.setup_helpers' (/Users/aphearin/work/repositories/python/halotools/dist/halotools-0.8/.eggs/astropy_helpers-2.0.11-py3.9.egg/astropy_helpers/setup_helpers.py)

from halotools.

pllim avatar pllim commented on July 17, 2024

The time you would sink into fixing this might as well be used to get rid of astropy-helpers altogether? I was hoping you would have similar success as astroquery but maybe your Cython/C is giving you problems that astroquery does not have to deal with.

https://docs.astropy.org/projects/package-template/en/latest/ape17.html

from halotools.

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.