Skip to content

Installation issue: py-pytest with external (system) python #27497

@alalazo

Description

@alalazo

Steps to reproduce the issue

Create an environment with:

$ mkdir tmp && cd tmp
$ spack env create -d .
$ spack external find python
$ spack add py-pytest

and then edit it to have a single external Python. In my case the final spack.yaml looks like:

# This is a Spack Environment file.
#
# It describes a set of packages to be installed, along with
# configuration settings.
spack:
  # add package specs to the `specs` list
  specs:
  - py-pytest
  view: true
  packages:
    python:
      externals:
      - spec: [email protected]+bz2+ctypes+dbm+lzma+nis+pyexpat+readline+sqlite3+ssl~tix~tkinter+uuid+zlib
        prefix: /usr

When trying to install the environment you should get errors near the end:

$ spack install
[ ... ]
==> Installing py-py-1.9.0-vohcpazqyqvxez6gopbq45pzxuaundmm
==> No binary for py-py-1.9.0-vohcpazqyqvxez6gopbq45pzxuaundmm found: installing from source
==> Using cached archive: /home/culpo/PycharmProjects/spack/var/spack/cache/_source-cache/archive/9c/9ca6883ce56b4e8da7e79ac18787889fa5206c79dcc67fb065376cd2fe03f342.tar.gz
==> No patches needed for py-py
==> py-py: Executing phase: 'build'
==> Error: ProcessError: Command exited with status 1:
    '/usr/bin/python3.8' '-s' 'setup.py' '--no-user-cfg' 'build'

1 warning found in build log:
  >> 3    WARNING: The wheel package is not available.
     4    Traceback (most recent call last):
     5      File "setup.py", line 45, in <module>
     6        main()
     7      File "setup.py", line 5, in main
     8        setup(
     9      File "/home/culpo/PycharmProjects/spack/opt/spack/linux-ubuntu20.04-icelake/gcc-9.3.0/py-setuptools-58.2.0-j3uiv6hk77qtaa3jo2mnek6gke5wzshg/lib/p
          ython3/dist-packages/setuptools/__init__.py", line 152, in setup

See build log for details:
  /tmp/culpo/spack-stage/spack-stage-py-py-1.9.0-vohcpazqyqvxez6gopbq45pzxuaundmm/spack-build-out.txt
[ ... ]

Information on your system

  • Spack: 0.17.0-171-2f84643c26
  • Python: 3.8.10
  • Platform: linux-ubuntu20.04-icelake
  • Concretizer: clingo

Additional information

spack-build-out.txt

@adamjstewart

Note that the issue is just with external Python. Letting Spack build a new interpreter works correctly. Being able to use a system Python is needed to let Spack bootstrap py-test and remove the outdated vendored dependency.

General information

  • I have run spack debug report and reported the version of Spack/Python/Platform
  • I have run spack maintainers <name-of-the-package> and @mentioned any maintainers
  • I have uploaded the build log and environment files
  • I have searched the issues of this repo and believe this is not a duplicate

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions