Skip to content
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

yeah on windows prior to python 3.12 #10

Open
varioustoxins opened this issue Apr 18, 2024 · 3 comments
Open

yeah on windows prior to python 3.12 #10

varioustoxins opened this issue Apr 18, 2024 · 3 comments

Comments

@varioustoxins
Copy link

Thank you for the great project

I have tried to install fyeah on windows prior to python 3.12 as part of supporting my project across all platforms and supported version of python

https://github.com/varioustoxins/NEF-Pipelines

but I get compiler errors with versions prior to python 3.12 and fyeah 0.4.0 (well at least on GitHub actions) the error is here

2024-04-18T20:47:25.0134824Z File "C:\Users\runneradmin\AppData\Local\Temp\pip-build-env-1zhgi1or\overlay\Lib\site-packages\setuptools_distutils\util.py", line 132, in convert_path
2024-04-18T20:47:25.0136750Z raise ValueError("path '%s' cannot be absolute" % pathname)
2024-04-18T20:47:25.0137911Z ValueError: path '/Users/ucodery/git/fyeah/fyeah/_cfyeah.c' cannot be absolute

url for run on 3.9 is

https://github.com/varioustoxins/NEF-Pipelines/actions/runs/8744395241

is this soluble or should I give up on the idea?

@ucodery
Copy link
Owner

ucodery commented Sep 3, 2024

Thank you for the issue. I see that there is a problem with the C-compiled extension for Windows platforms in earlier versions. However, version 0.4.0 specifically dropped C extensions in favour of a pure-Python implementation. As the logs you linked are no longer available (sorry for the slow response) are you certain that was the version being installed?

@varioustoxins
Copy link
Author

I thinks the problem was windows doesn't support the c compilation and 0.4.0 is only specified as being 3.12 + on PyPI.
I am most probably heading back to format because unfortunately yeah is dangerous on taking in formatting strings from the user in web abs as it can leak almost any internal state! This isn't a problem yet as my code isn't deployed to the web but it could be in the end...

@ucodery
Copy link
Owner

ucodery commented Sep 4, 2024

I think I understand the issue now. Windows had no wheels in versions < 0.4.0 so pip will build from sdist. There is a universal wheel version I could package for those versions (probably just 0.3.0) as the implementation doesn't depend on C. However, it is unavoidable that using f-yeah can leak internal state as it (and the reference f-strings) exec arbitrary code. Probably not a good idea for user-supplied strings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants