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

Access __file__ global in Early bind function (package.py) #1842

Open
vanridal opened this issue Oct 7, 2024 · 0 comments
Open

Access __file__ global in Early bind function (package.py) #1842

vanridal opened this issue Oct 7, 2024 · 0 comments
Labels
enhancement package-definition Related to package definition files/schema

Comments

@vanridal
Copy link

vanridal commented Oct 7, 2024

Sometimes it can be quite useful to access the location of a package file in a Early bind function
Maybe you want to find a relative file to read in, like a python requirments.txt or a VERSION token file

In the global preprocess, the DeveloperPackage object as a filepath attribute,
Unfortunately in Early bind function the this object does not, I thought to add the attribute to the this object but then this will add this path attribute to the built package file, which i think is undesirable.

I think the best option is to support the standard global variable __file__

As this will not be added to the final build package file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement package-definition Related to package definition files/schema
Projects
None yet
Development

No branches or pull requests

2 participants