[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: failing to package attrs-strict for swh.model
From: |
zimoun |
Subject: |
Re: failing to package attrs-strict for swh.model |
Date: |
Thu, 25 Jun 2020 14:59:53 +0200 |
Hi Marius,
Thank you for the help.
On Wed, 24 Jun 2020 at 22:10, Marius Bakke <marius@gnu.org> wrote:
> I notice the file name in this command is "attrs_strict". Probably the
> importer picked the wrong file name and you need to change it to
> (pypi-uri "attrs_strict" version).
Thanks! Stupid mistake I did. :-)
> Can you paste the full package definition?
Well, I have tried with and without the 'arguments'.
--8<---------------cut here---------------start------------->8---
(define-public python-attrs-strict
(package
(name "python-attrs-strict")
(version "0.1.0")
(source
(origin
(method url-fetch)
(uri (pypi-uri "attrs_strict" version))
(sha256
(base32
"0nldyv053xiv9aaysjszgisi9d9d87f5l2jf3rhl3xm9c9spar96"))))
(build-system python-build-system)
(native-inputs
`(("python-pytest" ,python-pytest)
("python-pluggy" ,python-pluggy)))
(propagated-inputs
`(("python-attrs" ,python-attrs)
("python-typing" ,python-typing)))
(arguments
`(#:phases (modify-phases %standard-phases
(replace 'check
(lambda _
(invoke "pytest")
#t)))))
(home-page "https://github.com/bloomberg/attrs-strict")
(synopsis "Runtime validators for attrs")
(description
"Package that contains runtime validation for @code{attrs} data classes
based on the types existing in the typing module.")
(license license:asl2.0)))
--8<---------------cut here---------------end--------------->8---
Then the Traceback is:
--8<---------------cut here---------------start------------->8---
starting phase `check'
Traceback (most recent call last):
File
"/gnu/store/3bk454z353a42l1l4yaxa6lrl3dh24mv-python-pytest-5.3.5/bin/.pytest-real",
line 11, in <module>
load_entry_point('pytest==5.3.5', 'console_scripts', 'pytest')()
File
"/gnu/store/q9rm8h9imazsq2c4qiv2yjpvlvliywqb-python-3.8.2/lib/python3.8/site-packages/pkg_resources/__init__.py",
line 489, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File
"/gnu/store/q9rm8h9imazsq2c4qiv2yjpvlvliywqb-python-3.8.2/lib/python3.8/site-packages/pkg_resources/__init__.py",
line 2852, in load_entry_point
return ep.load()
File
"/gnu/store/q9rm8h9imazsq2c4qiv2yjpvlvliywqb-python-3.8.2/lib/python3.8/site-packages/pkg_resources/__init__.py",
line 2443, in load
return self.resolve()
File
"/gnu/store/q9rm8h9imazsq2c4qiv2yjpvlvliywqb-python-3.8.2/lib/python3.8/site-packages/pkg_resources/__init__.py",
line 2449, in resolve
module = __import__(self.module_name, fromlist=['__name__'], level=0)
File
"/gnu/store/3bk454z353a42l1l4yaxa6lrl3dh24mv-python-pytest-5.3.5/lib/python3.8/site-packages/pytest/__init__.py",
line 6, in <module>
from _pytest.assertion import register_assert_rewrite
File
"/gnu/store/3bk454z353a42l1l4yaxa6lrl3dh24mv-python-pytest-5.3.5/lib/python3.8/site-packages/_pytest/assertion/__init__.py",
line 5, in <module>
from typing import Optional
File
"/gnu/store/lnbh9ks047sw41b6dc3zk6z1qy4b8cv0-python-typing-3.7.4.1/lib/python3.8/site-packages/typing.py",
line 1357, in <module>
class Callable(extra=collections_abc.Callable, metaclass=CallableMeta):
File
"/gnu/store/lnbh9ks047sw41b6dc3zk6z1qy4b8cv0-python-typing-3.7.4.1/lib/python3.8/site-packages/typing.py",
line 1005, in __new__
self._abc_registry = extra._abc_registry
AttributeError: type object 'Callable' has no attribute '_abc_registry'
command "pytest" failed with status 1
--8<---------------cut here---------------end--------------->8---
And without the 'replace' i.e., "python setup.py test", the Traceback
is:
--8<---------------cut here---------------start------------->8---
starting phase `check'
running "python setup.py" with command "test" and parameters ()
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "setup.py", line 14, in <module>
setup(long_description=long_description)
File
"/gnu/store/q9rm8h9imazsq2c4qiv2yjpvlvliywqb-python-3.8.2/lib/python3.8/site-packages/setuptools/__init__.py",
line 145, in setup
return distutils.core.setup(**attrs)
File
"/gnu/store/q9rm8h9imazsq2c4qiv2yjpvlvliywqb-python-3.8.2/lib/python3.8/distutils/core.py",
line 134, in setup
[...]
import typing
File
"/gnu/store/lnbh9ks047sw41b6dc3zk6z1qy4b8cv0-python-typing-3.7.4.1/lib/python3.8/site-packages/typing.py",
line 1357, in <module>
class Callable(extra=collections_abc.Callable, metaclass=CallableMeta):
File
"/gnu/store/lnbh9ks047sw41b6dc3zk6z1qy4b8cv0-python-typing-3.7.4.1/lib/python3.8/site-packages/typing.py",
line 1005, in __new__
self._abc_registry = extra._abc_registry
AttributeError: type object 'Callable' has no attribute '_abc_registry'
command "python" "-c" "import setuptools,
tokenize;__file__='setup.py';f=getattr(tokenize, 'open',
open)(__file__);code=f.read().replace('\\r\\n',
'\\n');f.close();exec(compile(code, __file__, 'exec'))" "test" failed with
status 1
--8<---------------cut here---------------end--------------->8---
Well, what I want at the end is the PyPI package "swh.model".
Thanks,
simon