Skip to content

Commit ae38cc9

Browse files
committed
Switch over astropy's setup.py to using the astropy_helpers submodule. Had to change all the various 'setup_package' modules to also astropy_helpers. Seems to work in basic cases.
Updating pointer to astropy_helpers
1 parent fdff244 commit ae38cc9

File tree

7 files changed

+20
-12
lines changed

7 files changed

+20
-12
lines changed

astropy/io/fits/setup_package.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from distutils.core import Extension
66
from glob import glob
77

8-
from astropy import setup_helpers
8+
from astropy_helpers import setup_helpers
99

1010

1111
def get_extensions():

astropy/io/votable/setup_package.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
from distutils.core import Extension
33
from os.path import join
44

5-
from astropy import setup_helpers
5+
from astropy_helpers import setup_helpers
66

77

88
def get_extensions(build_type='release'):

astropy/time/setup_package.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import os
44
from distutils.extension import Extension
55

6-
from astropy import setup_helpers
6+
from astropy_helpers import setup_helpers
77

88
TIMEROOT = os.path.relpath(os.path.dirname(__file__))
99

astropy/utils/xml/setup_package.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
from os.path import join
44
import sys
55

6-
from astropy import setup_helpers
6+
from astropy_helpers import setup_helpers
77

88

99
def get_external_libraries():

astropy/wcs/setup_package.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# Licensed under a 3-clause BSD style license - see LICENSE.rst
2-
from __future__ import absolute_import, division, print_function, unicode_literals
2+
from __future__ import (absolute_import, division, print_function,
3+
unicode_literals)
34

45
CONTACT = "Michael Droettboom"
56
@@ -11,7 +12,7 @@
1112
import shutil
1213
import sys
1314

14-
from astropy import setup_helpers
15+
from astropy_helpers import setup_helpers
1516
from astropy.extern import six
1617

1718
WCSROOT = os.path.relpath(os.path.dirname(__file__))

setup.py

+12-5
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@
88
import setuptools_bootstrap
99
from setuptools import setup
1010

11+
# TODO: Any code related to getting astropy_helpers on sys.path will be moved
12+
# into an astropy_helpers bootstrap script that will also handle the details of
13+
# *where* to get astropy_helpers: Via submodule sync in source repository
14+
# clones, or via setuptools setup_requires
15+
sys.path.insert(1, 'astropy_helpers')
16+
1117
#A dirty hack to get around some early import/configurations ambiguities
1218
if sys.version_info[0] >= 3:
1319
import builtins
@@ -18,10 +24,11 @@
1824
from distutils.dist import Distribution
1925

2026
import astropy
21-
from astropy.setup_helpers import (register_commands, adjust_compiler,
22-
get_package_info, get_debug_option,
23-
is_distutils_display_option)
24-
from astropy.version_helpers import get_git_devstr, generate_version_py
27+
from astropy_helpers.setup_helpers import (
28+
register_commands, adjust_compiler, get_package_info, get_debug_option,
29+
is_distutils_display_option)
30+
from astropy_helpers.git_helpers import get_git_devstr
31+
from astropy_helpers.version_helpers import generate_version_py
2532

2633
NAME = 'astropy'
2734

@@ -46,7 +53,7 @@
4653
adjust_compiler(NAME)
4754

4855
# Freeze build information in version.py
49-
generate_version_py(NAME, VERSION, RELEASE, get_debug_option())
56+
generate_version_py(NAME, VERSION, RELEASE, get_debug_option(NAME))
5057

5158
# Treat everything in scripts except README.rst as a script to be installed
5259
scripts = [fname for fname in glob.glob(os.path.join('scripts', '*'))

0 commit comments

Comments
 (0)