Commit ff9beb02 authored by Kirill Smelkov's avatar Kirill Smelkov

pyx.build: Simplify listing dependencies

/reviewed-on nexedi/pygolang!17
parent ad84cf76
# Copyright (C) 2019-2020 Nexedi SA and Contributors. # Copyright (C) 2019-2022 Nexedi SA and Contributors.
# Kirill Smelkov <kirr@nexedi.com> # Kirill Smelkov <kirr@nexedi.com>
# #
# This program is free software: you can Use, Study, Modify and Redistribute # This program is free software: you can Use, Study, Modify and Redistribute
...@@ -171,17 +171,19 @@ def _with_build_defaults(kw): # -> (pygo, kw') ...@@ -171,17 +171,19 @@ def _with_build_defaults(kw): # -> (pygo, kw')
# some C-level depends to workaround a bit lack of proper dependency # some C-level depends to workaround a bit lack of proper dependency
# tracking in setuptools/distutils. # tracking in setuptools/distutils.
dependv = kw.get('depends', [])[:] dependv = kw.get('depends', [])[:]
dependv.append('%s/golang/libgolang.h' % pygo) dependv.extend(['%s/golang/%s' % (pygo, _) for _ in [
dependv.append('%s/golang/context.h' % pygo) 'libgolang.h',
dependv.append('%s/golang/cxx.h' % pygo) 'context.h',
dependv.append('%s/golang/errors.h' % pygo) 'cxx.h',
dependv.append('%s/golang/fmt.h' % pygo) 'errors.h',
dependv.append('%s/golang/io.h' % pygo) 'fmt.h',
dependv.append('%s/golang/strings.h' % pygo) 'io.h',
dependv.append('%s/golang/sync.h' % pygo) 'strings.h',
dependv.append('%s/golang/time.h' % pygo) 'sync.h',
dependv.append('%s/golang/pyx/runtime.h' % pygo) 'time.h',
dependv.append('%s/golang/_testing.h' % pygo) 'pyx/runtime.h',
'_testing.h',
]])
kw['depends'] = dependv kw['depends'] = dependv
return pygo, kw return pygo, kw
...@@ -201,23 +203,25 @@ def Extension(name, sources, **kw): ...@@ -201,23 +203,25 @@ def Extension(name, sources, **kw):
# some pyx-level depends to workaround a bit lack of proper dependency # some pyx-level depends to workaround a bit lack of proper dependency
# tracking in setuptools/distutils. # tracking in setuptools/distutils.
dependv = kw.get('depends', [])[:] dependv = kw.get('depends', [])[:]
dependv.append('%s/golang/_golang.pxd' % pygo) dependv.extend(['%s/golang/%s' % (pygo, _) for _ in [
dependv.append('%s/golang/__init__.pxd' % pygo) '_golang.pxd',
dependv.append('%s/golang/context.pxd' % pygo) '__init__.pxd',
dependv.append('%s/golang/_context.pxd' % pygo) 'context.pxd',
dependv.append('%s/golang/cxx.pxd' % pygo) '_context.pxd',
dependv.append('%s/golang/errors.pxd' % pygo) 'cxx.pxd',
dependv.append('%s/golang/_errors.pxd' % pygo) 'errors.pxd',
dependv.append('%s/golang/fmt.pxd' % pygo) '_errors.pxd',
dependv.append('%s/golang/_fmt.pxd' % pygo) 'fmt.pxd',
dependv.append('%s/golang/io.pxd' % pygo) '_fmt.pxd',
dependv.append('%s/golang/_io.pxd' % pygo) 'io.pxd',
dependv.append('%s/golang/strings.pxd' % pygo) '_io.pxd',
dependv.append('%s/golang/sync.pxd' % pygo) 'strings.pxd',
dependv.append('%s/golang/_sync.pxd' % pygo) 'sync.pxd',
dependv.append('%s/golang/time.pxd' % pygo) '_sync.pxd',
dependv.append('%s/golang/_time.pxd' % pygo) 'time.pxd',
dependv.append('%s/golang/pyx/runtime.pxd' % pygo) '_time.pxd',
'pyx/runtime.pxd',
]])
kw['depends'] = dependv kw['depends'] = dependv
# workaround pip bug that for virtualenv case headers are installed into # workaround pip bug that for virtualenv case headers are installed into
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment