Giter Site home page Giter Site logo

Comments (12)

looooo avatar looooo commented on August 21, 2024

I guess you mean cmake. Pivy does not depend on qmake. But yes the build of pivy now depends on cmake. But only if you build coin with cmake. If not please use the setup_old.py .

from pivy.

J-Dunn avatar J-Dunn commented on August 21, 2024

Why do you assume I mean something else instead of reading code I posted ?

I'm running a python script, which is calling another python script, which is looking for QMAKE not cmake. Because the code is not well tested, when it does not find the executable it is expecting it craps out with a crash instead of closing with a suitable error message.


class QtInfo(object):
    def __init__(self, qmake_command=None):
        if qmake_command:
            self._qmake_command = qmake_command
        else:
            self._qmake_command = [find_executable("qmake-qt4"),]
        self._dict = {}

Why it is looking qmake is not my business. I'm just flagging a bug and providing a solution for a specific platform where this crashes in a messy way. Maybe someone who is a collaborator could fix it in a clean way using this information.

Maybe some should be testing the result of find_executable() before trying to use it as an object?

from pivy.

looooo avatar looooo commented on August 21, 2024

ah now I see, forgot about this stuff. I hope this makes you happy: db67d4d

from pivy.

J-Dunn avatar J-Dunn commented on August 21, 2024

Well maybe you need to test your commits before committing. You seem to have a typo there and it probably does not work. Like I suggested elsewhere, there seems to be a habit of writing code to test for things which never gets run in a context where it can be in the fail condition, or no thought is given to whether the result is valid, like the null object causing a mess when it gets dereferenced later.

You should also test because IIRC when I tried a similar get() someone else suggested, it did not exist.

Obviously running the code before a commit would be a good way not to introduce more bugs.

from pivy.

J-Dunn avatar J-Dunn commented on August 21, 2024
   if config_dict.get['SOQT_FOUND','false'] == 'false':
TypeError: 'builtin_function_or_method' object has no attribute '__getitem__'

from pivy.

looooo avatar looooo commented on August 21, 2024

Can't see my mistake. And again: I can't test this because I do not run your system. And I don't want to try out all possible system configurations.

btw.: commits are tested with travis: https://travis-ci.org/FreeCAD/pivy/builds/461811025?utm_source=github_status&utm_medium=notification

from pivy.

looooo avatar looooo commented on August 21, 2024

Ah maybe you meant this typo:
9deaae4

from pivy.

J-Dunn avatar J-Dunn commented on August 21, 2024

yep, I thought the typo was so obvious, I would not need to spell it out. Have you tried to run it on your platform at least, mine does not accept the get(), as posted above.

from pivy.

J-Dunn avatar J-Dunn commented on August 21, 2024

It did work with std code once I had fixed other errors. I think you posted somewhere that this "appeared" to be SoQt from msg but that it was something unrelated.

                         Welcome to Pivy 0.6.5a0!
                 Building Pivy has never been so much fun!

    
Platform...linux2
Python version...2.7.15
Checking for swig...
'/bin/swig'
Checking for SWIG version...
3.0.12
calling: cmake 

checking for COIN via cmake
COIN_FOUND: true
COIN_VERSION: 4.0.0
COIN_INCLUDE_DIR: /usr/local/include
COIN_LIB_DIR: /usr/local/lib64

checking for SOQT via cmake
SOQT_FOUND: false
SOQT_VERSION: 
SOQT_INCLUDE_DIR: 
SOQT_LIB_DIR: 

disable soqt, because cmake couldn't find it

coin-features are not supported in this version
Preparing Inventor headers:.

from pivy.

looooo avatar looooo commented on August 21, 2024

it's not config_dict.get['SOQT_FOUND','false'] but config_dict.get('SOQT_FOUND','false')

from pivy.

J-Dunn avatar J-Dunn commented on August 21, 2024

ah, my bad. Subtle but important difference. Thanks. In any case I have just run the unmodified code and it completed. The failure at that line seems to induced by something else. But it's probably more robust done that way.

The return of the search for 'qmake' that I flagged probably needs a test too, to ensure it is not empty null object.

from pivy.

J-Dunn avatar J-Dunn commented on August 21, 2024

This is what I found was needed to fix the "cstddef" errors. Pretty simple.

cd pivy-master/fake_headers
touch cstddef cstdarg cassert

from pivy.

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.