Skip to content

Packaging wont work if you add any other package dependency in your package #7

Description

@unlucky-cat

How to reproduce:

  1. Add import numpy as np into your vector.py file and for example this dummy method into Vector2D class
 #vector.py
import numpy as np
... class Vector2D:
...
def get_numpy_version(self):
return np.__version__
...
  1. run pip install -e .

you will get

# terminal output
(.venv) ...>pip install -e .
Obtaining .../VSCode/PythonProjectTemplate
Installing build dependencies ... done
Checking if build backend supports build_editable ... done
Getting requirements to build editable ... error
,,,
ModuleNotFoundError: No module named 'numpy'

you can fix this by making the following change int the pyproject.toml file, changing this

[tool.setuptools.dynamic]
version = {attr = "fastvector.__version__"}

to this

[tool.setuptools.dynamic]
version = {attr = "fastvector.version.__version__"}

OR

by adding Numpy to the build system dependencies

[build-system]
requires = [
"setuptools",
"setuptools-scm",
"numpy",
]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions