Skip to content

Instantly share code, notes, and snippets.

@stefanor
Last active April 19, 2025 23:40
Show Gist options
  • Save stefanor/c6a59e920655c95406f9b221dfefb733 to your computer and use it in GitHub Desktop.
Save stefanor/c6a59e920655c95406f9b221dfefb733 to your computer and use it in GitHub Desktop.
Reproducer for setuptools #4952
#!/usr/bin/env python
import sys
def fib(n):
if n < 0:
raise ValueError()
if n < 2:
return 1
return fib(n - 1) + fib(n - 2)
if __name__ == '__main__':
print(fib(int(sys.argv[1])))
check: build
$(wildcard build/scripts-*/fibpy.py) 12
build:
python3 setup.py build
clean:
rm -rf build
.PHONY: check clean
[build-system]
requires = ["setuptools >= 70.1.0"]
build-backend = 'setuptools.build_meta'
#!/usr/bin/python3
from setuptools import setup
setup(
name='fibpy',
version='42.0.0',
description='Pure Python Fibonacci',
scripts=['fibpy.py'],
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment