Skip to content

Commit 51cf46e

Browse files
committed
Simplify setup.py in arbitrary_bytes_repo
1 parent d4a25b2 commit 51cf46e

3 files changed

Lines changed: 3 additions & 6 deletions

File tree

testing/resources/arbitrary_bytes_repo/python3_hook/main.py renamed to testing/resources/arbitrary_bytes_repo/python3_hook.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import sys
66

77

8-
def func():
8+
def main():
99
# Intentionally write mixed encoding to the output. This should not crash
1010
# pre-commit and should write bytes to the output.
1111
sys.stdout.buffer.write('☃'.encode('UTF-8') + '²'.encode('latin1') + b'\n')

testing/resources/arbitrary_bytes_repo/python3_hook/__init__.py

Whitespace-only changes.
Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
1-
from setuptools import find_packages
21
from setuptools import setup
32

43
setup(
54
name='python3_hook',
65
version='0.0.0',
7-
packages=find_packages('.'),
8-
entry_points={
9-
'console_scripts': ['python3-hook = python3_hook.main:func'],
10-
},
6+
py_modules=['python3_hook'],
7+
entry_points={'console_scripts': ['python3-hook=python3_hook:main']},
118
)

0 commit comments

Comments
 (0)