I have a package my_lib
and want to use it in another repo in pycharm.
When I have my setup.py
file
from setuptools import setup, find_packages
with open("README.md", "r", encoding="utf-8") as fh:
long_description = fh.read()
setup(
name='my_lib',
version='1.0.0',
author='Some author',
author_email='[email protected]',
description='',
long_description=long_description,
long_description_content_type="text/markdown",
url='https://github.com/my-proj/my-lib',
project_urls={
"Bug Tracker": "https://github.com/my-proj/my-lib/issues"
},
license='Apache-2.0',
packages=find_packages(),
install_requires=[
'fastapi'
],
)
I can install it via
pip3.12 install -e ../my-lib
and PyCharm recognizes everything
However, when I add pyproject.toml
[build-system]
requires = ["setuptools>=64", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "my_lib"
version = "1.0.0"
description = ""
readme = "README.md"
requires-python = ">=3.10"
license = {text = "Apache-2.0"}
authors = [{name = "Some author", email = "[email protected]"}]
dependencies = [
"fastapi"
]
[project.urls]
Homepage = "https://github.com/my-proj/my-lib"
'Bug Tracker' = "https://github.com/my-proj/my-lib/issues"
the other project does not recognize something like
from my_lib.a import b
anymore.
Do you know how to resolve that?