SolidCode / SolidPython

A python frontend for solid modelling that compiles to OpenSCAD
1.13k stars 175 forks source link

SolidPython not on pypi #5

Closed jfhbrook closed 11 years ago

jfhbrook commented 12 years ago

http://pypi.python.org/pypi?:action=search&term=solidpython&submit=search :(

etjones commented 12 years ago

You're right, it's not there. Never thought about putting it up before. Will look into it.

ToddG commented 12 years ago

Or it would be nice to have a setup.py. Or install instructions. Perhaps a script to run the examples.

jfhbrook commented 12 years ago

If you get a setup.py publishing is pretty easy. I followed http://www.diveinto.org/python3/packaging.html for my few pypi packages and while it targets python 3 it's mostly applicable to python 2 as well.

etjones commented 12 years ago

Thanks for the link, Josh. I made a branch in my working copy to put together a setup.py. I'll try things out a little. I'm not really convinced that a PyPi package is the way to go. As it is, SolidPython requires one file, available from one Github page, that's the first thing you see when you search for "Python OpenSCAD" . Download the file (pyopenscad.py for historical reasons; changing this to solidpython.py to remove confusion) and put it someplace in sys.path, and you're good to go. Once I'm in easy_install / pip or egg territory, software gets to seem pretty black-boxy to me, and I'm afraid of obfuscating what is now a pretty transparent process.

That said, I'll give it a try and see if I can make the package auto-installable without making it more obscure. If you've got use cases that might convince me further ("I tried to easy_install solidpython and it didn't work", "I couldn't figure how to import the module, or which module to import; that process isn't transparent at all", etc) I'd be happy to hear them.

To be honest, the software's been available for a year and a half and nobody's noticed it much, so I didn't put much thought into making it more usable than the basic documentation. Now in the last month, three different people have made inquiries, so maybe it's time I add a little polish to the program. Thanks for showing interest, guys!

ToddG commented 12 years ago

On my mac, anyway, I need to use the os.path.abspath() to get os.path.dirname() to resolve to anything but, ''.

examples/basic_scad_include.py -superdir = os.path.dirname( os.path.dirname(file)) +superdir = os.path.dirname(os.path.dirname(os.path.abspath(file)))

It would be nice if this example included the file it's including, "/Path/To/MCAD/stepper.scad", as it breaks with out it.

This is a cool project. It would be nice to have a simple shell script to run all the examples...and works as a quick and dirty test suite, too.

etjones commented 11 years ago

I've been traveling for a while and not working on SolidPython, but I've just pushed a bunch of changes which include some of the ones mentioned in this discussion. Thanks for the input, guys.

So far: -- setup.py (courtesy of Felipe Sanches) usable with sudo python setup.py install -- shell script that runs all examples -- expanded examples -- Code name change. Now we can use SolidPython via: from solid import *

Upcoming: -- PyPi integration.

etjones commented 11 years ago

Just added SolidPython to PyPI. I've got to fix the setup.py file to get it to work with pip, but sudo easy_install solidpython

now works