Restructure project for pip installation as a Python package - #428
Open
boffman wants to merge 1 commit into
Open
Restructure project for pip installation as a Python package#428boffman wants to merge 1 commit into
boffman wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does it implement/fix? Explain your changes.
I made a xsstrike package, and moved/refactored the other packages as sub-packages to it, and added a
setup.pywith an entrypoint, making it possible to install locally and just runxsstrikeinstead ofpython <path_to_xsstrike.py>.That required updating some file reading paths for using the package instead of relative path to the script, plus assorted changes to imports. But now it can be installed directly from github with e.g.
pip install --user git+https://github.com/..../repo.gitand you get the script in$PATHwhich I think is nice.xsstrike.pywas renamed/moved toxsstrike/cli.pyand amain()was added in it, which is referenced insetup.pyas the entrypoint for the package.Where has this been tested?
Python Version:\ 3.12
Operating System: Ubuntu Linux 24.04
Does this close any currently open issues?
No
Does this add any new dependency?
No
Does this add any new command line switch/option?
No
Any other comments you would like to make?
I guess this has impact on documentation/images to run
xsstrikeinstead ofpython xsstrike.py.. I like it this way myself, having it in PATH, and offer this PR if it's interesting also in the main repo :-)Some Questions