Chris Withers
2018-04-11 07:57:59 UTC
Hi All,
I'm trying to build my first conda-only package and I'm confused between
the apparent duplication between meta.yaml and setup.py.
Here's my current meta.yaml:
https://gist.github.com/cjw296/481b155fa63e3d48241add1946f389d5
Everything that would be in setup.py appears to be in here, and yet if I
try a "PROJECT_VERSION=dev conda build ." I get:
...
Executing transaction: ...working... done
Copying /Users/chris/vcs/git/picky-conda to
/Users/chris/anaconda2/conda-bld/picky-conda_1523432431361/work
source tree in:
/Users/chris/anaconda2/conda-bld/picky-conda_1523432431361/work
python: can't open file 'setup.py': [Errno 2] No such file or directory
Traceback (most recent call last):
File "/Users/chris/anaconda2/bin/conda-build", line 11, in <module>
...
File
"/Users/chris/anaconda2/lib/python2.7/site-packages/conda_build/utils.py",
line 280, in _func_defaulting_env_to_os_environ
raise subprocess.CalledProcessError(proc.returncode, _args)
subprocess.CalledProcessError: Command '['/bin/bash', '-e',
'/Users/chris/anaconda2/conda-bld/picky-conda_1523432431361/work/conda_build.sh']'
returned non-zero exit status 2
Why does setup.py need to exist, and what gets used from it in
comparison to that in meta.yaml? (package name? version? entry_points?).
I also feel like I might be wrong in my expectation that "conda build ."
is the same as the "pip install -e .[build,test]" I'd do in a
pip-focused package. What's the conda equivalent?
(I need my entry point created so I can test it and I test my build/test
requirements installed so I can run pytest/coverage/etc).
If I put a minimal setup.py back in, as shown in the gist above, the
"PROJECT_VERSION=dev conda build ." eventually craps out with:
Executing transaction: ...working... done
+ picky -h
Traceback (most recent call last):
File
"/Users/chris/anaconda2/conda-bld/picky-conda_1523433369030/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeh/bin/picky",
line 6, in <module>
from picky.main import main
ModuleNotFoundError: No module named 'picky'
Tests failed for picky-conda-dev-py_0.tar.bz2 - moving package to
/Users/chris/anaconda2/conda-bld/broken
WARNING:conda_build.build:Tests failed for picky-conda-dev-py_0.tar.bz2
- moving package to /Users/chris/anaconda2/conda-bld/broken
removing: picky-conda-dev-py_0.tar.bz2
TESTS FAILED: picky-conda-dev-py_0.tar.bz2
What am I doing wrong?
cheers,
Chris
I'm trying to build my first conda-only package and I'm confused between
the apparent duplication between meta.yaml and setup.py.
Here's my current meta.yaml:
https://gist.github.com/cjw296/481b155fa63e3d48241add1946f389d5
Everything that would be in setup.py appears to be in here, and yet if I
try a "PROJECT_VERSION=dev conda build ." I get:
...
Executing transaction: ...working... done
Copying /Users/chris/vcs/git/picky-conda to
/Users/chris/anaconda2/conda-bld/picky-conda_1523432431361/work
source tree in:
/Users/chris/anaconda2/conda-bld/picky-conda_1523432431361/work
python: can't open file 'setup.py': [Errno 2] No such file or directory
Traceback (most recent call last):
File "/Users/chris/anaconda2/bin/conda-build", line 11, in <module>
...
File
"/Users/chris/anaconda2/lib/python2.7/site-packages/conda_build/utils.py",
line 280, in _func_defaulting_env_to_os_environ
raise subprocess.CalledProcessError(proc.returncode, _args)
subprocess.CalledProcessError: Command '['/bin/bash', '-e',
'/Users/chris/anaconda2/conda-bld/picky-conda_1523432431361/work/conda_build.sh']'
returned non-zero exit status 2
Why does setup.py need to exist, and what gets used from it in
comparison to that in meta.yaml? (package name? version? entry_points?).
I also feel like I might be wrong in my expectation that "conda build ."
is the same as the "pip install -e .[build,test]" I'd do in a
pip-focused package. What's the conda equivalent?
(I need my entry point created so I can test it and I test my build/test
requirements installed so I can run pytest/coverage/etc).
If I put a minimal setup.py back in, as shown in the gist above, the
"PROJECT_VERSION=dev conda build ." eventually craps out with:
Executing transaction: ...working... done
+ picky -h
Traceback (most recent call last):
File
"/Users/chris/anaconda2/conda-bld/picky-conda_1523433369030/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeh/bin/picky",
line 6, in <module>
from picky.main import main
ModuleNotFoundError: No module named 'picky'
Tests failed for picky-conda-dev-py_0.tar.bz2 - moving package to
/Users/chris/anaconda2/conda-bld/broken
WARNING:conda_build.build:Tests failed for picky-conda-dev-py_0.tar.bz2
- moving package to /Users/chris/anaconda2/conda-bld/broken
removing: picky-conda-dev-py_0.tar.bz2
TESTS FAILED: picky-conda-dev-py_0.tar.bz2
What am I doing wrong?
cheers,
Chris
--
You received this message because you are subscribed to the Google Groups "conda - Public" group.
To unsubscribe from this group and stop receiving emails from it, send an email to conda+***@continuum.io.
To post to this group, send email to ***@continuum.io.
Visit this group at https://groups.google.com/a/continuum.io/group/conda/.
To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/conda/3ea256dc-8b23-c4ca-5233-78593aa4ad34%40withers.org.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.
You received this message because you are subscribed to the Google Groups "conda - Public" group.
To unsubscribe from this group and stop receiving emails from it, send an email to conda+***@continuum.io.
To post to this group, send email to ***@continuum.io.
Visit this group at https://groups.google.com/a/continuum.io/group/conda/.
To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/conda/3ea256dc-8b23-c4ca-5233-78593aa4ad34%40withers.org.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.