![]() This seems to be true also for deleted packages and deleted verions. Set the POV-Ray executable path to point to your installation of POV-Ray, usually it is C:/Program Files/POV-Ray/v3.7/bin/pvengine64.exe, and apply. It seems pypi doesn't allow to upload a package with a version smaller then the biggest version of the package uploaded. After installing POV-Ray, launch FreeCAD, open the Preferences Editor, load the Raytracing Workbench, and go to the Raytracing Preferences. To install your extension locally with pip, do the following from a cmd (windows) or terminal (unix): cd īe carfully with version-numbering. You can specify required packages by setting the install_requires in the setup-function of the setup.py setup(., install_requires=. To tell setuptools to use the MANIFEST.in add this line to the setup function in the setup.py: setup(., include_package_data=True) (everything not directly connected to python). resourcesĪdditional to the setup.py there is often the need for a MANIFEST.in With this file it's possible to install data like icons, documentation files. If you need advanced options to install your package, please have a look at the documentation of (here: ). The setup.py file located in the main directory is a minimal example to get a extension installed. ![]() Using pip will give advanced possebilities to install dependencies. With pip and pypi a third option is introduced. adds the root-directory to easy_install.path.Ĭurrently freecad has several ways to install packages. simple link the extension to a location where python can find it.start FreeCAD from the root-directory you are working in (eg.If you want to work on your extension you have the following options: This can introduce name-clashes (although the chance it really is a problem is quite small)į = 10 test your module/ workbench (But as with python3 this _init_.py should not exist anyway, this isn't a problem.)įurther it's not allowed to add variables to the freecad-namespace directly. this means it is not allowed to set any variables in the _init_.py of freecad. The "freecad" namespace is not allowed to be used directly. Do not put very time-intensive code in these files to reduce the start-up time. Init.py and init_gui.py get called at startup of FreeCAD. These files are only used to let pkgutil find your extension with python2. Minimal structure of a freecad-workbench/module for python3 (only) freecad/ĭo not place code into freecad/_init_.py. Minimal structure of a freecad-workbench/module for python2 and 3 freecad/ init_gui.py: mandatory for modules adding new functionality to the gui.init.py: optional, is called at startup.To get a list of all the locations simple run this code in the FreeCAD-console: ìmport sys This is any location which is included in the sys.path. Template for a FreeCAD workbench / module basicsĪs python imports seems not that easy to understand, this template should show the way how extensions work in future versions of FreeCAD.ĭue to the fact we are now using the pktutil-module to find extension of freecad, it's possible to use standart-paths of pyton to place the extension.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |