ashb commented on a change in pull request #11487:
URL: https://github.com/apache/airflow/pull/11487#discussion_r503848471



##########
File path: setup.py
##########
@@ -749,14 +750,18 @@ def is_package_excluded(package: str, exclusion_list: 
List[str]):
 def do_setup():
     """Perform the Airflow package setup."""
     write_version()
+    # Note! Exclude does not work when combined with 'airflow' include so we 
need to remove
+    # providers manually
+    all_packages = [package for package in find_packages(include=['airflow', 
'airflow.*'])
+                    if not package.startswith('airflow.providers')]
     setup(
         name='apache-airflow',
         description='Programmatically author, schedule and monitor data 
pipelines',
         long_description=long_description,
         long_description_content_type='text/markdown',
         license='Apache License 2.0',
         version=version,
-        packages=find_packages(include=['airflow', 'airflow.*']),
+        packages=all_packages,

Review comment:
       ```suggestion
           packages=find_packages(include=['airflow*'], 
exclude=['airflow.providers', 'airflow.providers.*']),
   ```
   
   Tested with:
   
   ```
   [package for package in find_packages(include=['airflow', 'airflow.*']) if 
not package.startswith('airflow.providers')] == 
find_packages(include=['airflow*'], exclude=['airflow.providers', 
'airflow.providers.*'])
   ```




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to