GithubHelp home page GithubHelp logo

Comments (5)

jtrakk avatar jtrakk commented on August 15, 2024

tomlkit's tests directory caused a collision in nixpkgs. As I said in my Poetry PR,

If multiple distributions have tests as a top-level package, they'll conflict whenever both are installed. (Examples here and here). Two common alternative strategies are:

  1. not distributing tests (as here), or
  2. placing tests in a subdirectory of the main package, rather than adjacent (as here and here).

Either of these strategies will avoid this issue.

from tomlkit.

wgjak47 avatar wgjak47 commented on August 15, 2024

This problem also happen in gentoo.

 * ERROR: dev-python/tomlkit-0.7.0::gentoo-zh failed (install phase):
 *   Package installs 'tests' package which is forbidden and likely a bug in the build system.
 * 
 * Call stack:
 *     ebuild.sh, line  125:  Called src_install
 *   environment, line 2962:  Called distutils-r1_src_install
 *   environment, line 1187:  Called _distutils-r1_run_foreach_impl 'distutils-r1_python_install'
 *   environment, line  439:  Called python_foreach_impl 'distutils-r1_run_phase' 'distutils-r1_python_install'
 *   environment, line 2576:  Called multibuild_foreach_variant '_python_multibuild_wrapper' 'distutils-r1_run_phase' 'distutils-r1_python_install'
 *   environment, line 2058:  Called _multibuild_run '_python_multibuild_wrapper' 'distutils-r1_run_phase' 'distutils-r1_python_install'
 *   environment, line 2056:  Called _python_multibuild_wrapper 'distutils-r1_run_phase' 'distutils-r1_python_install'
 *   environment, line  778:  Called distutils-r1_run_phase 'distutils-r1_python_install'
 *   environment, line 1155:  Called distutils-r1_python_install
 *   environment, line 1074:  Called die
 * The specific snippet of code:
 *               die "Package installs '${p}' package which is forbidden and likely a bug in the build system.";
 * 
 * If you need support, post the output of `emerge --info '=dev-python/tomlkit-0.7.0::gentoo-zh'`,
 * the complete build log and the output of `emerge -pqv '=dev-python/tomlkit-0.7.0::gentoo-zh'`.
 * The complete build log is located at '/var/tmp/portage/dev-python/tomlkit-0.7.0/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/dev-python/tomlkit-0.7.0/temp/environment'.
 * Working directory: '/var/tmp/portage/dev-python/tomlkit-0.7.0/work/tomlkit-0.7.0'
 * S: '/var/tmp/portage/dev-python/tomlkit-0.7.0/work/tomlkit-0.7.0'

from tomlkit.

bollwyvl avatar bollwyvl commented on August 15, 2024

Also conda-forge: conda-forge/tomlkit-feedstock#24

We'd love the tests to be present in the sdist (a la recursive-include tests * and include_package_data=True) so we can run them, but excluded (a la find_packages(".", exclude=["tests*"]) so they don't cause this conflict. Alas, I do not know the poetry constructs for these techniques.

from tomlkit.

bollwyvl avatar bollwyvl commented on August 15, 2024

Perhaps:

[tool.poetry]
# ...
include = ["tests"]

and omit the line about including the tests in the sdist. I presume the whl will then have them, too, but that's another issue for another day, i suppose...

from tomlkit.

kwshi avatar kwshi commented on August 15, 2024

Relevant issue from Poetry: python-poetry/poetry#2353

from tomlkit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.