Skip to content

Commit bbafd94

Browse files
committed
Do not edit requirements.txt during the build.
1 parent 177e25e commit bbafd94

3 files changed

Lines changed: 7 additions & 5 deletions

File tree

.travis.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ matrix:
4545
- git clone --depth=1 https://github.com/libdynd/libdynd.git
4646
- python setup.py install --target=ndt -j2
4747
- rm -rf build dist dynd.ndt.egg-info
48-
- echo dynd.ndt >> requirements.txt
4948
- python setup.py install --target=nd -j2
5049
script:
5150
- pushd ..
@@ -79,7 +78,6 @@ script:
7978
- if [ $TRAVIS_BRANCH == "master" ] && [ $TRAVIS_PULL_REQUEST == "false" ]; then conda install --yes anaconda-client; fi
8079
- conda build conda/ndt.recipe --channel dynd/channel/dev
8180
- rm -rf build dist dynd.ndt.egg-info
82-
- echo dynd.ndt >> requirements.txt
8381
- conda build conda/nd.recipe --channel dynd/channel/dev
8482
- conda install --yes numpy libdynd --channel dynd/channel/dev
8583
- conda install $(conda build --output conda/ndt.recipe | grep bz2)

appveyor.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ build_script:
2626
- ps: if(-not $env:APPVEYOR_PULL_REQUEST_NUMBER) { conda install anaconda-client }
2727
- conda build conda\ndt.recipe --channel dynd/channel/dev
2828
- rd /q /s build dist dynd.ndt.egg-info
29-
- echo dynd.ndt >> requirements.txt
3029
- conda build conda\nd.recipe --channel dynd/channel/dev
3130

3231
on_success:

setup.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,13 @@ def get_library_names(self, build_type):
105105
else:
106106
return ndt + nd
107107

108-
target = Target(DIST_TARGET)
108+
def get_requirements(self):
109+
reqs = open('dev-requirements.txt').read().strip().split('\n')
110+
if self.target != 'ndt':
111+
reqs.append('dynd.ndt')
112+
return reqs
109113

114+
target = Target(DIST_TARGET)
110115

111116
# Check if we're running 64-bit Python
112117
is_64_bit = sys.maxsize > 2**32
@@ -305,7 +310,7 @@ def get_outputs(self):
305310
ext_modules = [Extension(target.get_name(), sources=[])],
306311
# This includes both build and install requirements. Setuptools' setup_requires
307312
# option does not actually install things, so isn't actually helpful...
308-
install_requires=open('dev-requirements.txt').read().strip().split('\n'),
313+
install_requires = target.get_requirements(),
309314
classifiers = [
310315
'Development Status :: 3 - Alpha',
311316
'Intended Audience :: Developers',

0 commit comments

Comments
 (0)