Skip to content

Installation issue: py-cython "error: option --single-version-externally-managed not recognized" #24526

@christoph-conrads

Description

@christoph-conrads

The package py-cython cannot be installed on Debian 9 / Devuan Ascii with Python 3.5.3

$ cat spack-build-out.txt
[...]
==> py-cython: Executing phase: 'install'
==> [2021-06-25-15:56:11.210480] '/usr/bin/python3.5' '-c' 'import distutils.sysconfig;print(distutils.sysconfig.get_python_lib(plat_specific=False, prefix=""));print(distutils.sysconfig.get_python_lib(plat_specific=True, prefix=""));print(distutils.sysconfig.get_python_inc(plat_specific=True, prefix=""))'
==> [2021-06-25-15:56:11.236681] '/usr/bin/python3.5' '-s' 'setup.py' '--no-user-cfg' 'install' '--prefix=/home/john/spack/opt/spack/linux-debian9-haswell/gcc-6.3.0/py-cython-0.29.22-e5clkxlqznff62nmazupvlfef5oqvg5j' '--single-version-externally-managed' '--root=/home/john/spack/opt/spack/linux-debian9-haswell/gcc-6.3.0/py-cython-0.29.22-e5clkxlqznff62nmazupvlfef5oqvg5j' '--install-purelib=lib/python3/dist-packages' '--install-platlib=lib/python3/dist-packages' '--install-scripts=bin' '--install-data=' '--install-headers=/usr/include/python3.5m'
Unable to find pgen, not compiling formal grammar.
usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
   or: setup.py --help [cmd1 cmd2 ...]
   or: setup.py --help-commands
   or: setup.py cmd --help

error: option --single-version-externally-managed not recognized

Steps to reproduce the issue

The issue can be reproduced in a Linux container. The first step shows how to set up the container, the second step contains the Spack commands.

LXD commands for creating a new Debian 9 LXD container with a user called john:

#!/bin/bash

set -e
set -u

lxc launch images:debian/9 d9
lxc exec d9 -- apt-get update
lxc exec d9 -- apt-get install -y \
    build-essential \
    bzip2 \
    curl \
    git \
    gzip \
    patch \
    python3 \
    python3-dev \
    tar \
    unzip \
    xz-utils \
    zstd \
    cmake \
    libssl-dev \
    pkg-config \
    sudo
lxc exec d9 -- adduser --disabled-password --gecos '' john

Login and execute these Spack commands:

git clone --depth=1 -- 'https://github.com/spack/spack.git'
. ~/spack/share/spack/setup-env.sh
spack external find
spack install py-cython

The problem does not occur with other Python interpreters built by Spack (e.g. Python 3.5.10, 3.8.10). For example, the following build succeeds:

spack install py-cython ^[email protected]:

I do not know if Python 3.5.3 is to blame or the Linux distribution.

Information on your system

  • git rev-parse HEAD: 2bc0c0ea59eeb81601bb6a1cc416100f0a8989ea
  • Spack: 0.16.1 <- strange, this is a Spack clone with latest commit date June 25
  • Python: 3.5.3
  • Platform: linux-debian9-haswell
  • Concretizer: original

Additional information

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 @adamjstewart
  • 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