Git Product home page Git Product logo

Comments (6)

rtobar avatar rtobar commented on July 3, 2024

@AluminumTank when building the package, the lack of yajl 1.X should be irrelevant: if it's not there, there shouldn't be a problem with building and/or installing the package, and/or running the tests. The ijson/backens/yajl.py backend only looks for yajl 1 at runtime.

Are you running into a particular issue, and if so can you provide the details? Otherwise the only advantage of trying to remove the yajl backend at build time is that you'll save a few bytes on installation. I'm not inclined to support such thing; moreover at some point the yajl backend will be removed anyway.

from ijson.

rtobar avatar rtobar commented on July 3, 2024

For reference, other distros distribute ijson without removing the yajl backend, even if they don't offer yajl 1.x either, you can have a look at https://repology.org/project/python:ijson/versions.

from ijson.

TinfoilSubmarine avatar TinfoilSubmarine commented on July 3, 2024

Awesome, thanks for the link. I went and looked at one of the other package's build script and realize that I was using python3 setup.py test rather than python3 -m pytest. Sorry to bother.

from ijson.

TinfoilSubmarine avatar TinfoilSubmarine commented on July 3, 2024

Also, to not be the "I solved it but didn't provide any details" guy, the error I was encountering was this:

======================================================================
ERROR: yajl (unittest.loader._FailedTest)
----------------------------------------------------------------------
ImportError: Failed to import test module: yajl
Traceback (most recent call last):
  File "/usr/lib/python3.9/unittest/loader.py", line 154, in loadTestsFromName
    module = __import__(module_name)
  File "/builddir/ijson-3.1.4/ijson/backends/yajl.py", line 11, in <module>
    yajl = _yajl2_ctypes_common.get_yajl(1)
  File "/builddir/ijson-3.1.4/ijson/backends/_yajl2_ctypes_common.py", line 46, in get_yajl
    yajl = backends.find_yajl_ctypes(version)
  File "/builddir/ijson-3.1.4/ijson/backends/__init__.py", line 42, in find_yajl_ctypes
    require_version(get_yajl_version(yajl), required)
  File "/builddir/ijson-3.1.4/ijson/backends/__init__.py", line 16, in require_version
    raise YAJLImportError('YAJL version %s.x required, found %s.%s.%s' % (required, major, minor, micro))
ijson.backends.YAJLImportError: YAJL version 1.x required, found 2.1.0


----------------------------------------------------------------------
Ran 574 tests in 0.653s

FAILED (errors=1)
Test failed: <unittest.runner.TextTestResult run=574 errors=1 failures=0>
error: Test failed: <unittest.runner.TextTestResult run=574 errors=1 failures=0>
=> ERROR: python3-ijson-3.1.4_1: do_check: 'python3 setup.py ${make_check_target} ${make_check_args}' exited with 1
=> ERROR:   in do_check() at common/build-style/python3-module.sh:40

...which can be avoided by not using the old test entrypoint in setup.py and using pytest instead.

from ijson.

rtobar avatar rtobar commented on July 3, 2024

I also run usually with python -munittest discover, which works as well ;)

from ijson.

TinfoilSubmarine avatar TinfoilSubmarine commented on July 3, 2024

I was working within the confines of one of the build-style scripts in void-packages which defaults to setup.py test if it can't find pytest with no other alternatives as far as I could tell. I figured conforming and not making my build-script a special snowflake was probably the best approach, but good to know there's other alternatives :)

from ijson.

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.