You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@libcloud.apache.org by to...@apache.org on 2019/12/21 16:44:36 UTC

[libcloud] 02/03: Include py.typed data file to signal that this package (atm only libcloud.compute base API) includes type annotations.

This is an automated email from the ASF dual-hosted git repository.

tomaz pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/libcloud.git

commit c7d074001d825b58fdaa389635b893aa78819c74
Author: Tomaz Muraus <to...@tomaz.me>
AuthorDate: Sat Dec 21 17:32:38 2019 +0100

    Include py.typed data file to signal that this package (atm only
    libcloud.compute base API) includes type annotations.
---
 CHANGES.rst       | 7 +++++++
 libcloud/py.typed | 0
 setup.py          | 4 +++-
 3 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/CHANGES.rst b/CHANGES.rst
index 653544e..adcd6a2 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -20,6 +20,13 @@ Common
   (GITHUB-1391, GITHUB-1390)
   [Tomaz Muraus]
 
+- Include ``py.typed`` data file to signal that this package contains type
+  annotations / hints.
+
+  NOTE: At the moment, type annotations are only available for the base
+  compute API.
+  [Tomaz Muraus]
+
 Compute
 -------
 
diff --git a/libcloud/py.typed b/libcloud/py.typed
new file mode 100644
index 0000000..e69de29
diff --git a/setup.py b/setup.py
index 7eec1f1..0436fe4 100644
--- a/setup.py
+++ b/setup.py
@@ -273,7 +273,9 @@ setup(
     package_dir={
         'libcloud': 'libcloud',
     },
-    package_data={'libcloud': get_data_files('libcloud', parent='libcloud')},
+    package_data={
+        'libcloud': get_data_files('libcloud', parent='libcloud') + ['py.typed'],
+    },
     license='Apache License (2.0)',
     url='http://libcloud.apache.org/',
     setup_requires=pytest_runner,