I want to write a python script that automatically compiles my python package using the command: python setup.py sdist bdist_wheel
My setup.py is the following:
from setuptools import setup, find_packages
with open("README.md", "r") as f:
description = f.read()
with open("VERSION", "r") as f:
version = f.read()
setup(
name="PygameBasis",
version=version,
packages=find_packages(),
install_requires=['pygame-ce'],
python_requires=">3.12",
long_description=description,
long_description_content_type="text/markdown",
)
When I try running the command using the subprocess package with subprocess.run(["python", "setup.py", "sdist", "bdist_wheel"]), I get the following error:
Traceback (most recent call last):
File "PATH\PygameBasis\setup.py", line 1, in <module>
from setuptools import setup, find_packages
ModuleNotFoundError: No module named 'setuptools'
I tried running subprocess.run(["pip", "install", "setuptools"]) before the command and that gave me:
Requirement already satisfied: setuptools in PATH\pygamebasis\venv\lib\site-packages (75.1.0)
Traceback (most recent call last):
File "PATH\PygameBasis\setup.py", line 1, in <module>
from setuptools import setup, find_packages
ModuleNotFoundError: No module named 'setuptools'
I am on Windows 11 with python 3.12 if that's of importance.
setuptoolsin yourrequirements.txtfile? I'd assume that's the issue.source ./bin/activate