[英]conda-build error: Directory '.' is not installable. Neither 'setup.py' nor 'pyproject.toml' found
Hej all,嘿嘿,
I am trying to build a conda package for a little program I wrote.我正在尝试为我编写的一个小程序构建一个 conda 包。 When I run
conda-build
, I get the error Directory '.' is not installable. Neither 'setup.py' nor 'pyproject.toml' found.
当我运行
conda-build
,出现错误Directory '.' is not installable. Neither 'setup.py' nor 'pyproject.toml' found.
Directory '.' is not installable. Neither 'setup.py' nor 'pyproject.toml' found.
I have researched this for some hours now (found the similar questions here, none of which solved my issue) and played with the meta.yaml file (below), but I didn't manage to get it to work.我已经研究了几个小时(在这里找到了类似的问题,没有一个解决了我的问题)并使用了 meta.yaml 文件(如下),但我没有设法让它工作。 Does anyone have an idea what could be going on here?
有谁知道这里会发生什么?
meta.yaml:元.yaml:
{% set name = "genview" %}
{% set version = "1.0" %}
package:
name: "{{ name|lower }}"
version: "{{ version }}"
source:
git_url: https://github.com/EbmeyerSt/GEnView.git
build:
number: 0
script: python -m pip install --no-deps --ignore-installed .
requirements:
host:
- pip
- python=3.6
run:
- python=3.6
- pip
- pandas
- biopython >=1.68
- numpy
- time
- sqlite
- argparse
- prodigal
- diamond
- blast
- cd-hit
- fasttree
test:
commands:
- genview_create_db.py --help
about:
home: https://github.com/EbmeyerSt/GEnView.git
license: GPLv3.0
license_family: GPL3
summary: Visualization tool for genomic sequences surrounding a gene
directory structure:目录结构:
../genview:
-script.py
-Readme.txt
/conda_receipe:
-meta.yaml
To build the package, I run conda-build /conda_receipe
from the genview directory.为了构建包,我从 genview 目录运行
conda-build /conda_receipe
。 Does anyone have an idea what is going on here?有谁知道这里发生了什么? Any clues would be appreciated!
任何线索将不胜感激!
According to the packaging scheme, you need a setup.py
or a pyproject.toml
in your project.根据打包方案,您的项目中需要一个
setup.py
或一个pyproject.toml
。 They are configuration files to generate a package.它们是用于生成包的配置文件。
If you want to use a setup.py
file, it is better to use setuptools
:如果要使用
setup.py
文件,最好使用setuptools
:
from setuptools import setup
setup(...) # add your setuptools options
(See the reference for setuptools
usage here ). (请参阅此处的
setuptools
用法参考)。
However, if you want to use a pyproject.toml
instead, you can refer to the build
project.但是,如果您想改用
pyproject.toml
,则可以参考build
项目。 You will have to write the pyprojet.toml
file (which is an INI-like file).您必须编写
pyprojet.toml
文件(这是一个类似 INI 的文件)。
See an example of using these files on this repository .请参阅在此存储库中使用这些文件的示例。 It uses both files, so take a look on it to get an idea.
它使用这两个文件,所以看看它以获得一个想法。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.