-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
how to provide directories to python programs? #25
Comments
Thanks for the quick fix. It's not clear to me how to try it out. I'm running a FreeBSD vm, but I suppose I should be able to check out this repository and build the one package for the one architecture. Here's hoping I can figure it out... |
I'm using the FreeBSD-11.0-STABLE box. This environment doesn't seems to supply
Some package info:
I don't expect it's relevant, but I commented out the stuff I'm not interested in building:
|
Hi there!
I had to fire up the package builds after I submitted that change. That
always takes some time, but should be finished now. Be sure to 'pkg
upgrade'.
To answer to your problem building ninja: building the cross toolchain
still depends on certain tools from the host system, like Python 2.
Ed
|
And |
I think it uses $PATH to find it. Do you have /usr/local/bin in there?
|
yes:
|
That's interesting. The idea is that this should normally work. I'll see if
I can reproduce this tomorrow.
Thanks for reporting this issue!
|
I'm past the directory issue. I/we can open a separate issue on rebuilding FreeBSD packages from source.
|
Ah... now I see why
|
Directory fds get converted to integers... How about Path objects instead? See Or at least: some flag to tell me it was an fd so I can convert to FdPath myself? -- cloudabi-ports/packages/python/patch-tool-python Lines 166 to 168 in 758bcea
|
As @sgielen is also using Python on CloudABI somewhat intensively, let's add him to this discussion as well. Sjors, with the |
Hi Dan, I had a look at the Python port with @sgielen the other day: it is indeed the case that any object that has a Dan, would you be interested in writing a Python class that you think would be suitable to wrap directory file descriptors? It could, for example, be based on Python 3.6's new Path abstraction. The only requirements this class should have:
Apart from that, you may add any utility function you think is necessary. If you give such a class to me, I'll add it to our version of Python and extend the interpreter's startup code to construct such objects. |
Ok. The At the language level, things like |
Thanks! Passing in operations explicitly is all right, but it would be nice if there was a wrapper function that only takes the file descriptor as an argument. That way the code in the interpreter can remain simple. Any preference for a package name? |
A package is something released separately from python, installed with pip and such, yes? Is that really what you want? Or do you just want a module with a class inside? Should this thing go in sys? In short: no, no preference. I'll flip coins or something... |
Yes, sorry; module. :-) |
The example for cloudabi for FreeBSD shows passing a directory:
I tried to follow this example but I got:
This is the yaml spec I tried:
The text was updated successfully, but these errors were encountered: