Skip to content

Commit 69df655

Browse files
committed
Declare all package data in setup.cfg instead of in setup_package.py files
1 parent 78dc4a5 commit 69df655

4 files changed

Lines changed: 8 additions & 69 deletions

File tree

‎astropy/setup_package.py‎

Lines changed: 0 additions & 20 deletions
This file was deleted.

‎astropy/tests/setup_package.py‎

Lines changed: 0 additions & 7 deletions
This file was deleted.

‎astropy/wcs/setup_package.py‎

Lines changed: 0 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -296,47 +296,5 @@ def get_extensions():
296296
return [Extension('astropy.wcs._wcs', **cfg)]
297297

298298

299-
def get_package_data():
300-
# Installs the testing data files
301-
api_files = [
302-
'astropy_wcs.h',
303-
'astropy_wcs_api.h',
304-
'distortion.h',
305-
'isnan.h',
306-
'pipeline.h',
307-
'pyutil.h',
308-
'sip.h',
309-
'util.h',
310-
'wcsconfig.h',
311-
]
312-
api_files = [join('include', 'astropy_wcs', x) for x in api_files]
313-
api_files.append(join('include', 'astropy_wcs_api.h'))
314-
315-
wcslib_headers = [
316-
'cel.h',
317-
'lin.h',
318-
'prj.h',
319-
'spc.h',
320-
'spx.h',
321-
'tab.h',
322-
'wcs.h',
323-
'wcserr.h',
324-
'wcsmath.h',
325-
'wcsprintf.h',
326-
]
327-
if not setup_helpers.use_system_library('wcslib'):
328-
for header in wcslib_headers:
329-
source = join('cextern', 'wcslib', 'C', header)
330-
dest = join('astropy', 'wcs', 'include', 'wcslib', header)
331-
if newer_group([source], dest, 'newer'):
332-
shutil.copy(source, dest)
333-
api_files.append(join('include', 'wcslib', header))
334-
335-
return {
336-
'astropy.wcs.tests': ['extension/*.c'],
337-
'astropy.wcs': api_files,
338-
}
339-
340-
341299
def get_external_libraries():
342300
return ['wcslib']

‎setup.cfg‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,14 @@ docs =
7878
scipy
7979
scikit-image
8080

81+
[options.package_data]
82+
* = data/*, data/*/*, data/*/*/*, data/*/*/*/*, data/*/*/*/*/*, data/*/*/*/*/*/*
83+
astropy = astropy.cfg, CITATION
84+
astropy.tests = coveragerc
85+
astropy.utils.tests = data/.hidden_file.txt
86+
astropy.wcs = include/*/*.h
87+
astropy.wcs.tests = extension/*.c
88+
8189
[build_sphinx]
8290
source-dir = docs
8391
build-dir = docs/_build

0 commit comments

Comments
 (0)