mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 02:15:43 -04:00
deploy-ng: Add option for extra PyPI indexes
This commit is contained in:
parent
04e4817667
commit
c789a3cae8
@ -30,6 +30,7 @@ class Distribution(distutils.dist.Distribution):
|
|||||||
self.exclude_modules = []
|
self.exclude_modules = []
|
||||||
self.deploy_platforms = []
|
self.deploy_platforms = []
|
||||||
self.requirements_path = './requirements.txt'
|
self.requirements_path = './requirements.txt'
|
||||||
|
self.pypi_extra_indexes = []
|
||||||
distutils.dist.Distribution.__init__(self, attrs)
|
distutils.dist.Distribution.__init__(self, attrs)
|
||||||
|
|
||||||
|
|
||||||
@ -74,13 +75,18 @@ class build(distutils.command.build.build):
|
|||||||
if use_wheels:
|
if use_wheels:
|
||||||
whldir = os.path.join(self.build_base, '__whl_cache__')
|
whldir = os.path.join(self.build_base, '__whl_cache__')
|
||||||
|
|
||||||
pip.main(args=[
|
pip_args = [
|
||||||
'download',
|
'download',
|
||||||
'-d', whldir,
|
'-d', whldir,
|
||||||
'-r', self.distribution.requirements_path,
|
'-r', self.distribution.requirements_path,
|
||||||
'--only-binary', ':all:',
|
'--only-binary', ':all:',
|
||||||
'--platform', platform,
|
'--platform', platform,
|
||||||
])
|
]
|
||||||
|
|
||||||
|
for index in self.distribution.pypi_extra_indexes:
|
||||||
|
pip_args += ['--extra-index-url', index]
|
||||||
|
|
||||||
|
pip.main(args=pip_args)
|
||||||
|
|
||||||
wheelpaths = [os.path.join(whldir,i) for i in os.listdir(whldir) if platform in i]
|
wheelpaths = [os.path.join(whldir,i) for i in os.listdir(whldir) if platform in i]
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user