Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/343.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/django/21.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 如何使用Tox和POYMENT在CircleCI中设置多个口译员?_Python_Django_Circleci_Tox_Python Poetry - Fatal编程技术网

Python 如何使用Tox和POYMENT在CircleCI中设置多个口译员?

Python 如何使用Tox和POYMENT在CircleCI中设置多个口译员?,python,django,circleci,tox,python-poetry,Python,Django,Circleci,Tox,Python Poetry,我正在为Django设置一个可重用的包。我使用poethy作为包管理器,并使用tox跨多个python环境进行测试。但是,我在CircleCI上不断收到以下错误: py27-django111: commands succeeded ERROR: py34-django111: InterpreterNotFound: python3.4 ERROR: py34-django20: InterpreterNotFound: python3.4 ERROR: py34-django21: I

我正在为Django设置一个可重用的包。我使用poethy作为包管理器,并使用tox跨多个python环境进行测试。但是,我在CircleCI上不断收到以下错误:

py27-django111: commands succeeded
ERROR:  py34-django111: InterpreterNotFound: python3.4
ERROR:  py34-django20: InterpreterNotFound: python3.4
ERROR:  py34-django21: InterpreterNotFound: python3.4
  py35-django111: commands succeeded
  py35-django20: commands succeeded
  py35-django21: commands succeeded
  py36-django111: commands succeeded
  py36-django20: commands succeeded
  py36-django21: commands succeeded
ERROR:  py37-django111: InterpreterNotFound: python3.7
ERROR:  py37-django20: InterpreterNotFound: python3.7
ERROR:  py37-django21: InterpreterNotFound: python3.7
我找不到任何关于如何解决这个问题的报告,我在CircleCI中看到了不同的Django包项目,但是它们在构建环境的方法上有所不同

My circle.yml文件:

version: 2

jobs:
  development:
    docker:
      - image: circleci/python:3.6.8

    steps:
      - checkout
      - run:
          name: Install
          command: |
            poetry install
      - run:
         name: Lint
         command: |
            poetry run flake8 django_package
      - run:
          name: Test
          command: |
            poetry run tox
      - run:
         name: Codecov
         command: |
            poetry run codecov

  deployment:
      docker:
        - image: circleci/python:3.6.8

      steps:
        - checkout
        - run:
            name: Publish
            command: |
              poetry publish --build --username "${PYPI_USERNAME}" --password "${PYPI_PASSWORD}" --no-interaction

workflows:
  version: 2

  development-workflow:
    jobs:
      - development

  deployment-workflow:
    jobs:
      - development:
          filters:
            tags:
              only: /v[0-9]+(\.[0-9]+)*/
            branches:
              ignore: /.*/
      - deployment:
          requires:
            - development
          filters:
              tags:
                only: /v[0-9]+(\.[0-9]+)*/
              branches:
                ignore: /.*/
我的tox.ini文件:

[tox]
skipsdist = True
envlist =
  {py27}-django{111}
  {py34,py35,py36,py37}-django{111,20,21}

[testenv]
whitelist_externals = poetry
skip_install = true
commands =
    poetry run coverage run --branch runtests.py tests

deps =
  django111: Django>=1.11,<2.0
  django20: Django>=2.0,<2.1
  django21: Django>=2.1

我发现,为了使用Tox在CircleCI上运行python 3.4和3.7,应该添加py340和py370,而不是py34和py37。算了吧

[tool.poetry.dependencies]
python = "*"
django = "*"

[tool.poetry.dev-dependencies]
coverage = "^4.5"
codecov = "^2.0"
flake8 = "^3.7"
tox = "^3.7"

[build-system]
requires = ["poetry>=0.12"]
build-backend = "poetry.masonry.api"