Skip to content

Remove last need for setup.py #15661

Open

Description

@nstarman

There only appears to be 1 vestigial need for setup.py. Is there any way we can remove that and therefore the entire file?

astropy/setup.py

Lines 72 to 74 in 52f737b

for ext in ext_modules:
if ext.include_dirs and "numpy" in ext.include_dirs[0]:
ext.define_macros.append(("NPY_TARGET_VERSION", "NPY_1_21_API_VERSION"))

Activity

  1. pllim commented on Nov 29, 2023

    @pllim
    Member

    I think @saimn tried and failed. (Ooops looks like I misremembered, it was Tom R.)

  2. astrofrog commented on Nov 29, 2023

    @astrofrog
    Member

    I think we could just define that macro in the actual C/Cython extensions in the setup_package.py files? Then we could just remove setup.py

  3. astrofrog commented on Nov 29, 2023

    @astrofrog
    Member

    See also #14361

  4. nstarman commented on Nov 29, 2023

    @nstarman
    MemberAuthor

    So... we should switch to Meson?
    I wonder how much work that actually is. It seems like we've done much of the heavy lifting already in migrating our files. Maybe it wouldn't be so bad!

  5. saimn commented on Dec 4, 2023

    @saimn
    Contributor

    AFAIK there are still things that can be done only with a setup.py (e.g. #14361 (comment) for build_ext options, I should also mention code coverage for cython, e.g. https://github.com/astropy/astroscrappy/blob/main/setup.py#L83).

    Also having to define/update things in 10+ setup_package.py files just to remove one doesn't seem too appealing. setup_package.py files are just disguised and hidden setup.py ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions