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

"Vendoring" scripts #41

Open
dwhswenson opened this issue Dec 4, 2019 · 2 comments
Open

"Vendoring" scripts #41

dwhswenson opened this issue Dec 4, 2019 · 2 comments

Comments

@dwhswenson
Copy link
Owner

Currently, user must manually copy setup.py/version.py in order to vendor them. It would be nice to have scripts vendor-setup vendor-version that just output the relevant files. That would also allow us to automatically include a comment in the vendored files with the specific version of Autorelease that it comes from (making updates much easier on users).

I think these should just output to stdout, so the user can direct into whatever file they want. We definitely don't want to force them to overwrite existing files; imagine a case where a user vendored our setup.py, then needed to add customization, and later wanted to update changes that we've made. In this case, they can use the script to put the new code in new_setup.py, and then use a merging tool to select the relevant changes (barring massive rewrites, at least).

@dwhswenson
Copy link
Owner Author

For version.py this is trivial: inspect.getsource(autorelease.version). For setup.py, maybe the Autorelease setup.py will need to rewrite itself into the package as _setup.py? Or move the setup.py to autorelease/_setup.py and then create a new setup.py that just executes that file?

@dwhswenson
Copy link
Owner Author

Note: as of #78, it is already possible to vendor the GitHub Actions scripts with autorelease vendor actions, called from the root directory of the repo.

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

1 participant