-
Notifications
You must be signed in to change notification settings - Fork 220
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
75 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Empty file.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import sys | ||
|
||
from .main import main | ||
|
||
if __name__ == "__main__": | ||
sys.exit(main()) |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import os | ||
import sys | ||
import platform | ||
import subprocess | ||
|
||
def main(): | ||
os_name = platform.system().lower() | ||
ext = os_name == "windows" and ".exe" or "" | ||
arch = platform.machine() | ||
subfolder = f"lefthook-{os_name}-{arch}" | ||
executable = os.path.join(os.path.dirname(__file__), "bin", subfolder, "lefthook"+ext) | ||
result = subprocess.run([executable] + sys.argv[1:]) | ||
return result.returncode |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
from setuptools import setup, find_packages | ||
|
||
setup( | ||
name='lefthook', | ||
version='1.7.18', | ||
author='Evil Martians', | ||
author_email='[email protected]', | ||
url='https://github.com/evilmartians/lefthook', | ||
description='A single dependency-free binary to manage all your git hooks that works with any language in any environment, and in all common team workflows', | ||
packages=find_packages(), | ||
entry_points={ | ||
'console_scripts': [ | ||
'lefthook=lefthook.main:main' | ||
], | ||
}, | ||
package_data={ | ||
'lefthook':[ | ||
'bin/lefthook-linux-x86_64/lefthook', | ||
'bin/lefthook-linux-arm64/lefthook', | ||
'bin/lefthook-freebsd-x86_64/lefthook', | ||
'bin/lefthook-freebsd-arm64/lefthook', | ||
'bin/lefthook-openbsd-x86_64/lefthook', | ||
'bin/lefthook-openbsd-arm64/lefthook', | ||
'bin/lefthook-windows-x86_64/lefthook.exe', | ||
'bin/lefthook-windows-arm64/lefthook.exe', | ||
'bin/lefthook-darwin-x86_64/lefthook', | ||
'bin/lefthook-darwin-arm64/lefthook', | ||
] | ||
}, | ||
classifiers=[ | ||
'License :: OSI Approved :: MIT License', | ||
'Operating System :: OS Independent', | ||
'Topic :: Software Development :: Version Control :: Git' | ||
], | ||
python_requires='>=3.6', | ||
) |