Kozea/tinycss2

Source tarball does not contain python tests

Closed this issue · 5 comments

[ 9s] ___________________ ERROR collecting tests/test_tinycss2.py ____________________
[ 9s] tests/test_tinycss2.py:100: in
[ 9s] @json_test()
[ 9s] tests/test_tinycss2.py:87: in decorator
[ 9s] @pytest.mark.parametrize(('css', 'expected'), load_json(filename_))
[ 9s] tests/test_tinycss2.py:79: in load_json
[ 9s] json_data = json.loads(path.read_text(encoding='utf-8'))
[ 9s] /usr/lib64/python3.6/pathlib.py:1196: in read_text
[ 9s] with self.open(mode='r', encoding=encoding, errors=errors) as f:
[ 9s] /usr/lib64/python3.6/pathlib.py:1183: in open
[ 9s] opener=self._opener)
[ 9s] /usr/lib64/python3.6/pathlib.py:1037: in _opener
[ 9s] return self._accessor.open(self, flags, mode)
[ 9s] /usr/lib64/python3.6/pathlib.py:387: in wrapped
[ 9s] return strfunc(str(pathobj), *args)
[ 9s] E FileNotFoundError: [Errno 2] No such file or directory: '/home/abuild/rpmbuild/BUILD/tinycss2-1.1.0/tests/css-parsing-tests/component_value_list.json'

-> the folder /tests/css-parsing-tests is empty in the source tarball as downloaded from here.
Github issue?

liZe commented

Hello!

Thanks for the bug report. You’re right, the tests are not included in the source tarball (because some files are in a submodule). We’ll release a new version with tests included soon!

liZe commented

tinycss2 1.1.1 has been released, including the missing tests.

As a side note: we have used the latest version of flit to generate the packages, and the source doesn’t include the generated setup.py file anymore. I don’t know if it’s a problem for SuSE, but if it is we’ll be happy to help.

I can only speak for openSUSE (SuSE is history, the company is called SUSE), but the missing setup.py is definitely a problem:

[ 23s] + python_flavor=python36
[ 23s] + /usr/bin/python3.6 setup.py build '--executable=/usr/bin/python3.6 -s'
[ 23s] /usr/bin/python3.6: can't open file 'setup.py': [Errno 2] No such file or directory
[ 23s] error: Bad exit status from /var/tmp/rpm-tmp.TeMnxe (%build)

liZe commented

I can only speak for openSUSE (SuSE is history, the company is called SUSE)

That’s a nice way to tell that I’ve been using Linux for a very long time 😃.

but the missing setup.py is definitely a problem:

The package will then probably require to use the pyproject.toml packages macros, instead of python_build and python_install.

If you’re interested in why the Python packaging is changing, there’s an interesting article about that. Don’t hesitate to ask if you have any questions!