Skip to content

Setup cleanup for C/Cython extensions - #41

Merged
eteq merged 9 commits into
astropy:masterfrom
eteq:setup-cleanup
Nov 4, 2011
Merged

eteq merged 9 commits into
astropy:masterfrom
eteq:setup-cleanup

Conversation

@eteq

@eteq eteq commented Nov 2, 2011

Copy link
Copy Markdown
Member

This pull request (in part motivated by @phn 's pull request #39) does a variety of fixes and clarifications in setup.py, mostly dealing with C/Cython extensions. It also updates the docs to reflect this scheme.

Key features/questions:

  • As before, the get_extensions function of setup_package.py files in a subpackage are used to return Extension objects.
  • The package source files are also searched for .pyx files (Cython files), and if they are found and not present in the Extension objects, they are added as new Extensions with the default numpy c-imports included. This
    will hopefully facilitate easy development of Cython extensions when needed simply by adding a .pyx file and importing its name from somewhere else.
  • Cython is used as long as the source is not in "release" mode, and Cython is installed. Otherwise, it tries to install any .c file with the appropriate name in the same place as the .pyx file.
  • even if they aren't building anything in C/Cython, subpackages can still install data files and package data files (although the latter may change depending on how the config subpackage is eventually decided).

Comment thread astropy/setup_helpers.py Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Extra indent here.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed - thanks!

eteq added a commit that referenced this pull request Nov 4, 2011
Setup.py cleanup for C/Cython extensions
@eteq
eteq merged commit 1652ccd into astropy:master Nov 4, 2011
keflavich pushed a commit to keflavich/astropy that referenced this pull request Oct 9, 2013
Setup.py cleanup for C/Cython extensions
eteq added a commit that referenced this pull request Jun 23, 2017
Add void arguments also in erfaversion.c
jeffjennings pushed a commit to jeffjennings/astropy that referenced this pull request Jul 2, 2025
jeffjennings pushed a commit to jeffjennings/astropy that referenced this pull request Jul 2, 2025
Fixes Issue astropy#41 Adds pyregion to affiliated package list
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants