J'essaie d'examiner la conda pour la gestion de paquets python/environnements virtuels. Cependant, je ne peux pas sembler être capable de construire mon propre paquet de conda. Quelqu'un pourrait-il m'aider à construire un exemple de travail minimal?Exemple de travail minimal pour la construction du paquetage conda
d'abord une structure de répertoire:
- src/
|- foo1.py
|- foo2.py
- conda-build/
|- meta.yaml
- setup.py
L'exécution python setup.py install
installe les paquets en utilisant pip. Maintenant, si je tente de cd dans le répertoire Conda-Générez et exécutez conda build .
je reçois la sortie suivante
Removing old build directory
Removing old work directory
BUILD START: example_pkg-0.5.1-abc
Fetching package metadata: ......
Solving package specifications: .
The following NEW packages will be INSTALLED:
pip: 6.1.1-py34_0
python: 3.4.3-0
setuptools: 15.0-py34_0
Linking packages ...
[ COMPLETE ]|##################################################| 100%
Removing old work directory
Copying C:\some\path\ to C:\Anaconda3\conda-bld\work
Package: example_pkg-0.5.1-abc
source tree in: C:\Anaconda3\conda-bld\work
number of files: 0
Fixing permissions
Fixing permissions
BUILD END: example_pkg-0.5.1-abc
Nothing to test for: example_pkg-0.5.1-abc
# If you want to upload this package to binstar.org later, type:
#
# $ binstar upload C:\Anaconda3\conda-bld\win-64\example_pkg-0.5.1- abc.tar.bz2
#
# To have conda build upload to binstar automatically, use
# $ conda config --set binstar_upload yes
Je peux en effet trouver le paquet dans le répertoire C: \ Anaconda3 \ Conda-bld \ win-64, mais la package ne semble pas contenir de fichiers. Je peux installer le paquet en utilisant conda install --use-local .\example_pkg-0.5.1-abc.tar.bz2
puis il est listé par conda list
, mais je ne peux pas l'importer en Python. Ceci est mon meta.yaml:
package:
name: example_pkg
version: "0.5.1"
source:
path: ../src
build:
number: 1
string: abc
script: python setup.py install
requirements:
build:
- python
run:
- python
Toute aide est grandement appréciée! :)