Code Monkey home page Code Monkey logo

Comments (12)

lcpt avatar lcpt commented on August 16, 2024 2

Done! It needed 18:09 hours of work, not so bad.

Migration to Python 3 is completed.

from xc.

berndhahnebach avatar berndhahnebach commented on August 16, 2024 2

YEAH! It took much much more hours to port FreeCAD

from xc.

lcpt avatar lcpt commented on August 16, 2024 1

https://mobile.linuxtoday.com/developer/python-2-removed-from-ubuntu-20.04-lts-200219221006.html?utm_source=dlvr.it&utm_medium=twitter

from xc.

lcpt avatar lcpt commented on August 16, 2024 1

I've just finished with the migration of the xc_utils package. I'll continue with XC soon. It doesn't seem too difficult.

from xc.

lcpt avatar lcpt commented on August 16, 2024

Hi, thank you very much for your offer.

I think we can make the code run under both Python 2 and Python 3. I've started with the modules in xc_utils, you can take a look to the last commit.

I was trying to make one of the simplest tests test_evalPy.py to run under Python3. I've not succeeded there is some problem when installing the c++ extensions; Python3 doesn't find them. Maybe you can take a look to the setup file. It puts the libraries in '/usr/local/lib/python3/dist-packages' but Python3 doesn't find them.

Regards. Luis.

from xc.

 avatar commented on August 16, 2024

You're welcome ;)

I will look at the file later, but as I can see from your comment, there's no address as '/usr/local/lib/python3/dist-packages' at least in Debian-based distros. In Debian minor version of python should be included, something like: '/usr/local/lib/python3.5/dist-packages'

regards.
Salman

from xc.

lcpt avatar lcpt commented on August 16, 2024

Hi.

It's the line; 'pth_to_libs= get_python_lib(1,0,myPrefix)' in setup.py which returns the directory for the libraries: '/usr/local/lib/python2.7/dist-packages' when executed with Python 2 and '/usr/local/lib/python3/dist-packages' when executed with Python3. I'm using Ubuntu 18.04.

from xc.

berndhahnebach avatar berndhahnebach commented on August 16, 2024

good luck luis with the move to Py3. On FreeCAD it took a huge amount of time ... but eventualle it was worth any second spent ont the move to Py3.

cheers bernd

from xc.

lcpt avatar lcpt commented on August 16, 2024

Thanks Bernd.

The first thing I'm trying to do is to expose XC c++ modules to Py3 (i thought that it was a trivial step but, apparently, it is not so trivial...). On the bright side I think XC is simpler than FreeCAD.

from xc.

ebrahimraeyat avatar ebrahimraeyat commented on August 16, 2024

Hi @lcpt , what is going on this migration? any effort? thanks.

from xc.

lcpt avatar lcpt commented on August 16, 2024

Hi Ebrahim.

We've postponed the migration of the C++ modules to Python 3 until the release of Ubuntu 20.4 in April. I think that working with a distribution that comes with Python 3 as default will make things a lot easier. In the interim we are gently migrating the Python modules.

from xc.

lcpt avatar lcpt commented on August 16, 2024

FreeCAD is much more complex.

from xc.

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.