A port for bpy?

I would like to register my interest in a port for bpy. (blender as a python module). Perhaps equivalently, instuctions as to how to build blender as a python module, as found here. I expect to be able to use such a thing to create scenes with blender making full use of the multi-core machine I have. I believe there is already a port for blender. I'm currently on ubuntu, but very much like the concept of bsd, and would be proud to say I was a user. :)
 
For anybody else reading this, wondering what my reaction will be, (You could say I got the response I expected), I'm starting to read through the handbook, out of curiosity if nothing else. Maybe I'll get through a page a day on average.. I don't have any illusions about how long this might take if I actually end up doing it. A casual estimate would be a year, if not 5 (I really seriously have no idea what this might involve), so nobody hold their breath.. :rolleyes:😂
 
Personally, I think that if it takes you one day per porter's handbook page you're doing it wrong. I'd recommend reading the overall sections familiarizing yourself with the architecture & underlying concepts. Then, move on to examining existing ports. Once you encounter something in an existing port that you don't understand based on what you've read in the handbook before, go look that particular thing up in the handbook. Use it more as a reference.
For example, there is no point in reading all the sections about "how to use perl", "how to use go", "how to use ..." if you know that you're going to port a python module.
Also, doing wins over studying with this sort of thing. There is no harm done by just starting to create a Makefile and going step-by-step. Use ports-mgmt/poudriere-devel to easily test your ports. In many cases it will tell you what is not working out. Tools like portlint and portclippy are also helpful at times (and somewhat mandatory before your port gets submitted anyway).
Depending your experience with building software, it might also be helpful to start with something easier in the beginning. I don't know bpy but it could be a bit hairy in the beginning as I assume that you'll have to deal with the blender dependency which may or may not need different options etc.

Compared to other OS / ecosystems, I feel like FreeBSD has a very easy approach to creating & maintaining ports. I created my first port about a year ago and now it's seven (with more in the pipeline).

The TL;DR of this is: Don't get discouraged by not knowing things - none of us knew anything about anything. We all learned it - one way or another :)
 
Personally, I think that if it takes you one day per porter's handbook page you're doing it wrong. I'd recommend reading the overall sections familiarizing yourself with the architecture & underlying concepts. Then, move on to examining existing ports. Once you encounter something in an existing port that you don't understand based on what you've read in the handbook before, go look that particular thing up in the handbook. Use it more as a reference.
For example, there is no point in reading all the sections about "how to use perl", "how to use go", "how to use ..." if you know that you're going to port a python module.
Also, doing wins over studying with this sort of thing. There is no harm done by just starting to create a Makefile and going step-by-step. Use ports-mgmt/poudriere-devel to easily test your ports. In many cases it will tell you what is not working out. Tools like portlint and portclippy are also helpful at times (and somewhat mandatory before your port gets submitted anyway).
Depending your experience with building software, it might also be helpful to start with something easier in the beginning. I don't know bpy but it could be a bit hairy in the beginning as I assume that you'll have to deal with the blender dependency which may or may not need different options etc.

Compared to other OS / ecosystems, I feel like FreeBSD has a very easy approach to creating & maintaining ports. I created my first port about a year ago and now it's seven (with more in the pipeline).

The TL;DR of this is: Don't get discouraged by not knowing things - none of us knew anything about anything. We all learned it - one way or another :)
Thank you for the encouragement and the comentary! :) ..for some entertaining context I spent bits and pieces of the day I first got curious about it reading through the first few sections of the handbook, up to slow porting, and haven't gone back to it since. other priorities. So you can do the math as to how many pages of the book I'm averaging per day.. ..giggle.. :)
For further entertainment, the thing that has struck me the most so far is the following note:

These steps assume that the software compiled out-of-the-box. In other words, absolutely no changes were required for the application to work on a FreeBSD system. If anything had to be changed, refer to Slow Porting.

That seems to imply that 'porting', and 'getting the software to work on my computer', are two different things. I thought they were the same thing. Maybe they are, and that paragraph is just misleading. no matter :) Sounds like 'porting' is: "automating the process I just did to help others". Perhaps :) ..anything else I say will be a ramble. I have much, much more reading to do before I can ask anything intelligent :)
 
That seems to imply that 'porting', and 'getting the software to work on my computer', are two different things.
In my opinion that is indeed the case: They are two separate things. Although I guess it makes more sense to refer to them as "separate tasks" instead. Personally, I always make things work on my machine before I even think of creating the port for it. After all, a port is merely a recipe to automate the steps you performed to get it working so that others can get it working too (but then in a more automated way).
 
In my opinion that is indeed the case: They are two separate things. Although I guess it makes more sense to refer to them as "separate tasks" instead. Personally, I always make things work on my machine before I even think of creating the port for it. After all, a port is merely a recipe to automate the steps you performed to get it working so that others can get it working too (but then in a more automated way).

..with that confirmed, the obvious next question is, for getting the software working on my computer that is not yet packaged or ported for bsd, is there an established approved way of doing that? Or is that included as part of the handbook? ..I've done some searching, for how to install software that is not yet packaged or ported, but got tired.

Long story short, when I opened my post with: "I would like to register my interest in a port for bpy.", and followed up with context, I believe I -was- being as clear as I could be, considering what I knew. Now I know better. What I need now, or what would be useful, is guidance as to how to install un-ported software on bsd. I'll keep researching, in bits and pieces, in the coming months. :) Maybe this information -is- in the handbook? I'll include it in my research :)
 
for getting the software working on my computer that is not yet packaged or ported for bsd, is there an established approved way of doing that? Or is that included as part of the handbook?
That is not covered in any of the FreeBSD handbooks because it doesn't really have anything to do with FreeBSD (as an OS).
The short answer is: That process is highly different for each type of software.
Have a look at this: https://wiki.freebsd.org/Python/PortsPolicy
There seem to be some shortcuts if the module is registered at PyPi (which seems to be the case) so this might be fairly easy actually.

Long story short, when I opened my post with: "I would like to register my interest in a port for bpy.", and followed up with context, I believe I -was- being as clear as I could be, considering what I knew. Now I know better.
That is called learning - you're doing great! ;)
 
..back for more entertainment.. having looked through this, it is now clear to me that even -this- is putting the cart before the horse. It's still all about ports. Sure it's encouraging in the sense that it becomes clear that there is some software that can be considered "more main-stream", such that porting it will be easier, as you said. The question remains, how to get the software working in the first place. I've now found this: Install pip on bsd. Let that be the measure of how much I know about bsd, I was like: "oh! wow! you can do all that? Looks almost like what I do on linux! ..hehe!.. ..well, back to other things.. :)
 
Honestly, don't use pip. At least not as root. It will install python modules in the system's directories, potentially overwriting or breaking any Python modules that were installed with pkg(8). Besides that, pkg(8) will be unaware of those installations.

If you want to play around with Python, pip and whatnot, do this in a Python venv. That will keep it separate from the system.
 
Honestly, don't use pip. At least not as root. It will install python modules in the system's directories, potentially overwriting or breaking any Python modules that were installed with pkg(8). Besides that, pkg(8) will be unaware of those installations.

If you want to play around with Python, pip and whatnot, do this in a Python venv. That will keep it separate from the system.

Thank you SirDice! ..this will be the third version of this reply..

I have finally concluded that the appropriate way of interpreting this is that I -do- want to be using a virtual environment for this. ..mainly because the bpy documentation includes (seems to) information on how to do this. ...that established, the next obvious question becomes, if I -do- do this, then.. how would the result translate to a port or package? are there ports/packages that setup their own virtual environments? many questions. for now, more reading to do.
 
Back
Top