From 9a3acb1f1c874ca5a8e848d27497cdff0b2d6fa2 Mon Sep 17 00:00:00 2001 From: mstechly Date: Mon, 14 Feb 2022 15:15:13 -0500 Subject: [PATCH 1/2] Added support for typing for dependent packages. --- MANIFEST.in | 1 + pyproject.toml | 3 +++ setup.cfg | 8 ++++++-- src/lsqecc/py.typed | 0 4 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 MANIFEST.in create mode 100644 src/lsqecc/py.typed diff --git a/MANIFEST.in b/MANIFEST.in new file mode 100644 index 00000000..d88880f0 --- /dev/null +++ b/MANIFEST.in @@ -0,0 +1 @@ +include src/lsqecc/py.typed \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 1aab79fe..ab0eee9d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -12,6 +12,9 @@ line-length = 100 [tool.mypy] ignore_missing_imports = true +namespace_packages = true +explicit_package_bases = true +mypy_path = "src" [tool.pytest.ini_options] testpaths = ["tests"] diff --git a/setup.cfg b/setup.cfg index d4024676..7171230a 100644 --- a/setup.cfg +++ b/setup.cfg @@ -23,8 +23,7 @@ project_urls = Tracker = https://github.com/latticesurgery-com/lattice-surgery-compiler/issues [options] -packages = - lsqecc +packages = find: python_requires = >=3.7 install_requires = qiskit>=0.24.0, <0.35.0 @@ -32,6 +31,11 @@ install_requires = igraph>=0.9.8, <0.9.10 package_dir = =src +zip_safe = False +include_package_data = True + +[options.packages.find] +where = src [options.extras_require] latex = diff --git a/src/lsqecc/py.typed b/src/lsqecc/py.typed new file mode 100644 index 00000000..e69de29b From b67dd74c5a76df08159b658fbba83ea70e8fb1e4 Mon Sep 17 00:00:00 2001 From: mstechly Date: Thu, 17 Feb 2022 11:12:47 -0500 Subject: [PATCH 2/2] Updated setup & pyproject.toml. --- pyproject.toml | 3 --- setup.cfg | 3 +++ 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index ab0eee9d..1aab79fe 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -12,9 +12,6 @@ line-length = 100 [tool.mypy] ignore_missing_imports = true -namespace_packages = true -explicit_package_bases = true -mypy_path = "src" [tool.pytest.ini_options] testpaths = ["tests"] diff --git a/setup.cfg b/setup.cfg index 7171230a..e7157a9e 100644 --- a/setup.cfg +++ b/setup.cfg @@ -31,7 +31,10 @@ install_requires = igraph>=0.9.8, <0.9.10 package_dir = =src +# Allows to avoid issues with installing package in editable mode. +# See also: https://github.com/python/mypy/issues/7508#issuecomment-531965557 zip_safe = False +# Require for compliance with PEP 561 include_package_data = True [options.packages.find]