raulcd commented on PR #48988:
URL: https://github.com/apache/arrow/pull/48988#issuecomment-3811378201

   @pitrou sdist is copying the licenses when executing `python -m build 
--sdist . --no-isolation` but the wheels are not copying licenses when 
executing `python -m build --wheel . --no-isolation`.
   
   I tried to create a custom `bdist_wheel` command to mimic what we do on 
`CopyLicenseSdist` but even though the files are being copied (end of the log 
below) it seems like setuptools checks for those before running the custom 
command and those are not being bundled on the final wheel:
   ```
   python -m build --wheel . --no-isolation
   * Getting build dependencies for wheel...
   ...
     warn(
   /opt/python/cp314-cp314/lib/python3.14/site-packages/setuptools/dist.py:483: 
SetuptoolsDeprecationWarning: Cannot find any files for the given pattern.
   !!
   
           
********************************************************************************
           Pattern 'LICENSE.txt' did not match any files.
   
           By 2027-Feb-18, you need to update your project and remove 
deprecated calls
           or your builds will no longer be supported.
           
********************************************************************************
   
   !!
     for path in sorted(cls._find_pattern(pattern, enforce_match))
   /opt/python/cp314-cp314/lib/python3.14/site-packages/setuptools/dist.py:483: 
SetuptoolsDeprecationWarning: Cannot find any files for the given pattern.
   !!
   
           
********************************************************************************
           Pattern 'NOTICE.txt' did not match any files.
   
           By 2027-Feb-18, you need to update your project and remove 
deprecated calls
           or your builds will no longer be supported.
           
********************************************************************************
   
   !!
     for path in sorted(cls._find_pattern(pattern, enforce_match))
   running egg_info
   creating pyarrow.egg-info
   writing pyarrow.egg-info/PKG-INFO
   writing dependency_links to pyarrow.egg-info/dependency_links.txt
   writing top-level names to pyarrow.egg-info/top_level.txt
   writing manifest file 'pyarrow.egg-info/SOURCES.txt'
   listing git files failed - pretending there aren't any
   reading manifest file 'pyarrow.egg-info/SOURCES.txt'
   reading manifest template 'MANIFEST.in'
   warning: no previously-included files matching '*.so' found anywhere in 
distribution
   warning: no previously-included files matching '*.pyc' found anywhere in 
distribution
   warning: no previously-included files matching '*~' found anywhere in 
distribution
   warning: no previously-included files matching '#*' found anywhere in 
distribution
   warning: no previously-included files matching '.git*' found anywhere in 
distribution
   warning: no previously-included files matching '.DS_Store' found anywhere in 
distribution
   no previously-included directories found matching '.asv'
   writing manifest file 'pyarrow.egg-info/SOURCES.txt'
   * Building wheel...
     warn(
   /opt/python/cp314-cp314/lib/python3.14/site-packages/setuptools/dist.py:483: 
SetuptoolsDeprecationWarning: Cannot find any files for the given pattern.
   !!
   
           
********************************************************************************
           Pattern 'LICENSE.txt' did not match any files.
   
           By 2027-Feb-18, you need to update your project and remove 
deprecated calls
           or your builds will no longer be supported.
           
********************************************************************************
   
   !!
     for path in sorted(cls._find_pattern(pattern, enforce_match))
   /opt/python/cp314-cp314/lib/python3.14/site-packages/setuptools/dist.py:483: 
SetuptoolsDeprecationWarning: Cannot find any files for the given pattern.
   !!
   
           
********************************************************************************
           Pattern 'NOTICE.txt' did not match any files.
   
           By 2027-Feb-18, you need to update your project and remove 
deprecated calls
           or your builds will no longer be supported.
           
********************************************************************************
   
   !!
     for path in sorted(cls._find_pattern(pattern, enforce_match))
   running bdist_wheel
   Copied ../LICENSE.txt to LICENSE.txt for wheel build
   Copied ../NOTICE.txt to NOTICE.txt for wheel build
   ```
   
   The current CI check is successful because we "manually" copy those licenses 
on the sdist to the `pyarrow` source folder. As I am executing build wheel 
after build sdist those files are there (we are using the sdist command as a 
fancy copy basically).
   
   I can think of three possible solutions:
   - Manually copy the files (as I was doing initially)
   - Build the sdist first, untar and build the wheel from there. I can't use 
the .tar.gz as source for `build`, probably we want to untar on a temp folder.
   - Create a custom build backend to run before any setuptools. This seems 
over-engineering just for license shenanigans.


-- 
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.

To unsubscribe, e-mail: [email protected]

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

Reply via email to