pypa/build

Build sdist with `setuptools_scm` and subfolders

diegoferigo opened this issue ยท 12 comments

I'm trying to build a source distribution for a modern project that:

  1. Uses setup.cfg
  2. Uses pypa/setuptools_scm
  3. The configuration files are stored in a subfolder

The current behaviour is that the sdist will only contain the files of the subfolder instead of the files of the whole repository. Any pip install <sdist>.tar.gz would fail since the archive is not the complete repo.

Please check this repo as a reference, particularly the tools/pip subfolder.

In order to reproduce the problem, execute the following commands:

git clone https://github.com/diegoferigo/ycm -b feature/setup.py
cd ycm
python -m build -o dist --sdist tools/pip # succeeds but creates partial sdist
pip install dist/*.tar.gz                 # fails

Instead, using calling directly the setup.py file, creates an archive with the whole repo but with missing metadata.

Direct setup.py call
ycm on ๎‚  feature/setup.py via โ–ณ v3.20.2 ๐Ÿ…’ /conda  
โฏ python tools/pip/setup.py sdist
running sdist
running egg_info
writing UNKNOWN.egg-info/PKG-INFO
writing dependency_links to UNKNOWN.egg-info/dependency_links.txt
writing top-level names to UNKNOWN.egg-info/top_level.txt
writing manifest file 'UNKNOWN.egg-info/SOURCES.txt'
running check
warning: Check: missing required meta-data: name, url

warning: Check: missing meta-data: either (author and author_email) or (maintainer and maintainer_email) must be supplied

creating UNKNOWN-0.12.3.dev35+dirty
creating UNKNOWN-0.12.3.dev35+dirty/.reuse
creating UNKNOWN-0.12.3.dev35+dirty/3rdparty
creating UNKNOWN-0.12.3.dev35+dirty/3rdparty/cmake-wiki
creating UNKNOWN-0.12.3.dev35+dirty/3rdparty/qgv
creating UNKNOWN-0.12.3.dev35+dirty/LICENSES
creating UNKNOWN-0.12.3.dev35+dirty/UNKNOWN.egg-info
creating UNKNOWN-0.12.3.dev35+dirty/build-modules
creating UNKNOWN-0.12.3.dev35+dirty/cmake-next
creating UNKNOWN-0.12.3.dev35+dirty/cmake-next/proposed
creating UNKNOWN-0.12.3.dev35+dirty/cmake-next/v3.14
creating UNKNOWN-0.12.3.dev35+dirty/deprecated
creating UNKNOWN-0.12.3.dev35+dirty/docs
creating UNKNOWN-0.12.3.dev35+dirty/docs/static
creating UNKNOWN-0.12.3.dev35+dirty/docs/templates
creating UNKNOWN-0.12.3.dev35+dirty/find-modules
creating UNKNOWN-0.12.3.dev35+dirty/help
creating UNKNOWN-0.12.3.dev35+dirty/help/images
creating UNKNOWN-0.12.3.dev35+dirty/help/manual
creating UNKNOWN-0.12.3.dev35+dirty/help/module
creating UNKNOWN-0.12.3.dev35+dirty/help/release
creating UNKNOWN-0.12.3.dev35+dirty/help/variable
creating UNKNOWN-0.12.3.dev35+dirty/internal-modules
creating UNKNOWN-0.12.3.dev35+dirty/modules
creating UNKNOWN-0.12.3.dev35+dirty/style-modules
creating UNKNOWN-0.12.3.dev35+dirty/tests
creating UNKNOWN-0.12.3.dev35+dirty/tests/RunCMake
creating UNKNOWN-0.12.3.dev35+dirty/tests/RunCMake/3rdparty
creating UNKNOWN-0.12.3.dev35+dirty/tests/RunCMake/AddInstallRPATHSupport
creating UNKNOWN-0.12.3.dev35+dirty/tests/RunCMake/IncludeUrl
creating UNKNOWN-0.12.3.dev35+dirty/tests/RunCMake/cmake-next
creating UNKNOWN-0.12.3.dev35+dirty/tests/YCMBootstrap
creating UNKNOWN-0.12.3.dev35+dirty/tests/sha1sums
creating UNKNOWN-0.12.3.dev35+dirty/tools
creating UNKNOWN-0.12.3.dev35+dirty/tools/installer
creating UNKNOWN-0.12.3.dev35+dirty/tools/pip
copying files to UNKNOWN-0.12.3.dev35+dirty...
copying CMakeLists.txt -> UNKNOWN-0.12.3.dev35+dirty
copying LICENSE -> UNKNOWN-0.12.3.dev35+dirty
copying README.md -> UNKNOWN-0.12.3.dev35+dirty
copying YCMConfig.cmake.in -> UNKNOWN-0.12.3.dev35+dirty
copying .reuse/dep5 -> UNKNOWN-0.12.3.dev35+dirty/.reuse
copying 3rdparty/CMakeLists.txt -> UNKNOWN-0.12.3.dev35+dirty/3rdparty
copying 3rdparty/catch2.cmake -> UNKNOWN-0.12.3.dev35+dirty/3rdparty
copying 3rdparty/cmake-wiki.cmake -> UNKNOWN-0.12.3.dev35+dirty/3rdparty
copying 3rdparty/cmrc.cmake -> UNKNOWN-0.12.3.dev35+dirty/3rdparty
copying 3rdparty/ecm.cmake -> UNKNOWN-0.12.3.dev35+dirty/3rdparty
copying 3rdparty/eigen3.cmake -> UNKNOWN-0.12.3.dev35+dirty/3rdparty
copying 3rdparty/ovito.cmake -> UNKNOWN-0.12.3.dev35+dirty/3rdparty
copying 3rdparty/qgv.cmake -> UNKNOWN-0.12.3.dev35+dirty/3rdparty
copying 3rdparty/qt-gstreamer.cmake -> UNKNOWN-0.12.3.dev35+dirty/3rdparty
copying 3rdparty/uselatex.cmake -> UNKNOWN-0.12.3.dev35+dirty/3rdparty
copying 3rdparty/vtk.cmake -> UNKNOWN-0.12.3.dev35+dirty/3rdparty
copying 3rdparty/cmake-wiki/COPYING.CMake-wiki -> UNKNOWN-0.12.3.dev35+dirty/3rdparty/cmake-wiki
copying 3rdparty/cmake-wiki/FindOctave.cmake -> UNKNOWN-0.12.3.dev35+dirty/3rdparty/cmake-wiki
copying 3rdparty/cmake-wiki/README.CMake-wiki -> UNKNOWN-0.12.3.dev35+dirty/3rdparty/cmake-wiki
copying 3rdparty/qgv/FindGraphviz.cmake -> UNKNOWN-0.12.3.dev35+dirty/3rdparty/qgv
copying 3rdparty/qgv/LICENSE.txt -> UNKNOWN-0.12.3.dev35+dirty/3rdparty/qgv
copying 3rdparty/qgv/README.qgv -> UNKNOWN-0.12.3.dev35+dirty/3rdparty/qgv
copying LICENSES/BSD-3-Clause.txt -> UNKNOWN-0.12.3.dev35+dirty/LICENSES
copying UNKNOWN.egg-info/PKG-INFO -> UNKNOWN-0.12.3.dev35+dirty/UNKNOWN.egg-info
copying UNKNOWN.egg-info/SOURCES.txt -> UNKNOWN-0.12.3.dev35+dirty/UNKNOWN.egg-info
copying UNKNOWN.egg-info/dependency_links.txt -> UNKNOWN-0.12.3.dev35+dirty/UNKNOWN.egg-info
copying UNKNOWN.egg-info/top_level.txt -> UNKNOWN-0.12.3.dev35+dirty/UNKNOWN.egg-info
copying build-modules/BuildECM.cmake -> UNKNOWN-0.12.3.dev35+dirty/build-modules
copying build-modules/BuildEigen3.cmake -> UNKNOWN-0.12.3.dev35+dirty/build-modules
copying build-modules/BuildGazeboYARPPlugins.cmake -> UNKNOWN-0.12.3.dev35+dirty/build-modules
copying build-modules/BuildGooCanvas.cmake -> UNKNOWN-0.12.3.dev35+dirty/build-modules
copying build-modules/BuildGooCanvasMM.cmake -> UNKNOWN-0.12.3.dev35+dirty/build-modules
copying build-modules/BuildGtkDatabox.cmake -> UNKNOWN-0.12.3.dev35+dirty/build-modules
copying build-modules/BuildGtkDataboxMM.cmake -> UNKNOWN-0.12.3.dev35+dirty/build-modules
copying build-modules/BuildICUB.cmake -> UNKNOWN-0.12.3.dev35+dirty/build-modules
copying build-modules/BuildTinyXML.cmake -> UNKNOWN-0.12.3.dev35+dirty/build-modules
copying build-modules/BuildYARP.cmake -> UNKNOWN-0.12.3.dev35+dirty/build-modules
copying build-modules/BuildqpOASES.cmake -> UNKNOWN-0.12.3.dev35+dirty/build-modules
copying build-modules/CMakeLists.txt -> UNKNOWN-0.12.3.dev35+dirty/build-modules
copying cmake-next/CMakeLists.txt -> UNKNOWN-0.12.3.dev35+dirty/cmake-next
copying cmake-next/Copyright.txt -> UNKNOWN-0.12.3.dev35+dirty/cmake-next
copying cmake-next/README -> UNKNOWN-0.12.3.dev35+dirty/cmake-next
copying cmake-next/proposed/CMakeParseArguments.cmake -> UNKNOWN-0.12.3.dev35+dirty/cmake-next/proposed
copying cmake-next/proposed/ExternalProject-download.cmake.in -> UNKNOWN-0.12.3.dev35+dirty/cmake-next/proposed
copying cmake-next/proposed/ExternalProject-verify.cmake.in -> UNKNOWN-0.12.3.dev35+dirty/cmake-next/proposed
copying cmake-next/proposed/ExternalProject.cmake -> UNKNOWN-0.12.3.dev35+dirty/cmake-next/proposed
copying cmake-next/v3.14/BasicConfigVersion-AnyNewerVersion.cmake.in -> UNKNOWN-0.12.3.dev35+dirty/cmake-next/v3.14
copying cmake-next/v3.14/CMakePackageConfigHelpers.cmake -> UNKNOWN-0.12.3.dev35+dirty/cmake-next/v3.14
copying cmake-next/v3.14/Copyright.txt -> UNKNOWN-0.12.3.dev35+dirty/cmake-next/v3.14
copying cmake-next/v3.14/UseSWIG.cmake -> UNKNOWN-0.12.3.dev35+dirty/cmake-next/v3.14
copying cmake-next/v3.14/WriteBasicConfigVersionFile.cmake -> UNKNOWN-0.12.3.dev35+dirty/cmake-next/v3.14
copying deprecated/CMakeLists.txt -> UNKNOWN-0.12.3.dev35+dirty/deprecated
copying deprecated/FindGLUT.cmake -> UNKNOWN-0.12.3.dev35+dirty/deprecated
copying deprecated/YCMDefaultDirs.cmake -> UNKNOWN-0.12.3.dev35+dirty/deprecated
copying docs/CMakeLists.txt -> UNKNOWN-0.12.3.dev35+dirty/docs
copying docs/apply_qthelp_css_workaround.cmake -> UNKNOWN-0.12.3.dev35+dirty/docs
copying docs/cmake-objects.inv -> UNKNOWN-0.12.3.dev35+dirty/docs
copying docs/cmake.py -> UNKNOWN-0.12.3.dev35+dirty/docs
copying docs/conf.py.in -> UNKNOWN-0.12.3.dev35+dirty/docs
copying docs/fixup_qthelp_names.cmake -> UNKNOWN-0.12.3.dev35+dirty/docs
copying docs/static/ycm-favicon.ico -> UNKNOWN-0.12.3.dev35+dirty/docs/static
copying docs/static/ycm-logo-16.png -> UNKNOWN-0.12.3.dev35+dirty/docs/static
copying docs/static/ycm.css -> UNKNOWN-0.12.3.dev35+dirty/docs/static
copying docs/templates/layout.html -> UNKNOWN-0.12.3.dev35+dirty/docs/templates
copying find-modules/CMakeLists.txt -> UNKNOWN-0.12.3.dev35+dirty/find-modules
copying find-modules/FindACE.cmake -> UNKNOWN-0.12.3.dev35+dirty/find-modules
copying find-modules/FindAtlas.cmake -> UNKNOWN-0.12.3.dev35+dirty/find-modules
copying find-modules/FindCFW2CANAPI.cmake -> UNKNOWN-0.12.3.dev35+dirty/find-modules
copying find-modules/FindDRAGONFLYAPI.cmake -> UNKNOWN-0.12.3.dev35+dirty/find-modules
copying find-modules/FindESDCANAPI.cmake -> UNKNOWN-0.12.3.dev35+dirty/find-modules
copying find-modules/FindFTDI.cmake -> UNKNOWN-0.12.3.dev35+dirty/find-modules
copying find-modules/FindFreenect.cmake -> UNKNOWN-0.12.3.dev35+dirty/find-modules
copying find-modules/FindFuse.cmake -> UNKNOWN-0.12.3.dev35+dirty/find-modules
copying find-modules/FindGLFW3.cmake -> UNKNOWN-0.12.3.dev35+dirty/find-modules
copying find-modules/FindGLM.cmake -> UNKNOWN-0.12.3.dev35+dirty/find-modules
copying find-modules/FindGSL.cmake -> UNKNOWN-0.12.3.dev35+dirty/find-modules
copying find-modules/FindGooCanvas.cmake -> UNKNOWN-0.12.3.dev35+dirty/find-modules
copying find-modules/FindGooCanvasMM.cmake -> UNKNOWN-0.12.3.dev35+dirty/find-modules
copying find-modules/FindGtkDatabox.cmake -> UNKNOWN-0.12.3.dev35+dirty/find-modules
copying find-modules/FindGtkDataboxMM.cmake -> UNKNOWN-0.12.3.dev35+dirty/find-modules
copying find-modules/FindI2C.cmake -> UNKNOWN-0.12.3.dev35+dirty/find-modules
copying find-modules/FindIPOPT.cmake -> UNKNOWN-0.12.3.dev35+dirty/find-modules
copying find-modules/FindIPP.cmake -> UNKNOWN-0.12.3.dev35+dirty/find-modules
copying find-modules/FindLibOVR.cmake -> UNKNOWN-0.12.3.dev35+dirty/find-modules
copying find-modules/FindLibdc1394.cmake -> UNKNOWN-0.12.3.dev35+dirty/find-modules
copying find-modules/FindLibedit.cmake -> UNKNOWN-0.12.3.dev35+dirty/find-modules
copying find-modules/FindLibusb1.cmake -> UNKNOWN-0.12.3.dev35+dirty/find-modules
copying find-modules/FindLibv4l2.cmake -> UNKNOWN-0.12.3.dev35+dirty/find-modules
copying find-modules/FindLibv4lconvert.cmake -> UNKNOWN-0.12.3.dev35+dirty/find-modules
copying find-modules/FindNVIDIACg.cmake -> UNKNOWN-0.12.3.dev35+dirty/find-modules
copying find-modules/FindODE.cmake -> UNKNOWN-0.12.3.dev35+dirty/find-modules
copying find-modules/FindOpenCV.cmake -> UNKNOWN-0.12.3.dev35+dirty/find-modules
copying find-modules/FindOpenGL.cmake -> UNKNOWN-0.12.3.dev35+dirty/find-modules
copying find-modules/FindOpenNI.cmake -> UNKNOWN-0.12.3.dev35+dirty/find-modules
copying find-modules/FindOpenNI2.cmake -> UNKNOWN-0.12.3.dev35+dirty/find-modules
copying find-modules/FindPLXCANAPI.cmake -> UNKNOWN-0.12.3.dev35+dirty/find-modules
copying find-modules/FindPortAudio.cmake -> UNKNOWN-0.12.3.dev35+dirty/find-modules
copying find-modules/FindReadline.cmake -> UNKNOWN-0.12.3.dev35+dirty/find-modules
copying find-modules/FindSQLite.cmake -> UNKNOWN-0.12.3.dev35+dirty/find-modules
copying find-modules/FindStage.cmake -> UNKNOWN-0.12.3.dev35+dirty/find-modules
copying find-modules/FindTinyXML.cmake -> UNKNOWN-0.12.3.dev35+dirty/find-modules
copying find-modules/FindYamlCpp.cmake -> UNKNOWN-0.12.3.dev35+dirty/find-modules
copying find-modules/FindZFP.cmake -> UNKNOWN-0.12.3.dev35+dirty/find-modules
copying find-modules/Findassimp.cmake -> UNKNOWN-0.12.3.dev35+dirty/find-modules
copying find-modules/FindqpOASES.cmake -> UNKNOWN-0.12.3.dev35+dirty/find-modules
copying help/highlights.rst -> UNKNOWN-0.12.3.dev35+dirty/help
copying help/index.rst -> UNKNOWN-0.12.3.dev35+dirty/help
copying help/todo.rst -> UNKNOWN-0.12.3.dev35+dirty/help
copying help/images/domenichelli-ijsc2019.svg -> UNKNOWN-0.12.3.dev35+dirty/help/images
copying help/images/domenichelli-irc2018.svg -> UNKNOWN-0.12.3.dev35+dirty/help/images
copying help/images/iit-logo-icub.png -> UNKNOWN-0.12.3.dev35+dirty/help/images
copying help/images/lock.png -> UNKNOWN-0.12.3.dev35+dirty/help/images
copying help/images/superbuild-concept.png -> UNKNOWN-0.12.3.dev35+dirty/help/images
copying help/images/walkman.png -> UNKNOWN-0.12.3.dev35+dirty/help/images
copying help/manual/ycm-build-system-support.7.rst -> UNKNOWN-0.12.3.dev35+dirty/help/manual
copying help/manual/ycm-devel.7.rst -> UNKNOWN-0.12.3.dev35+dirty/help/manual
copying help/manual/ycm-faq.7.rst -> UNKNOWN-0.12.3.dev35+dirty/help/manual
copying help/manual/ycm-installing.7.rst -> UNKNOWN-0.12.3.dev35+dirty/help/manual
copying help/manual/ycm-modules.7.rst -> UNKNOWN-0.12.3.dev35+dirty/help/manual
copying help/manual/ycm-superbuild-example.7.rst -> UNKNOWN-0.12.3.dev35+dirty/help/manual
copying help/manual/ycm-superbuild.7.rst -> UNKNOWN-0.12.3.dev35+dirty/help/manual
copying help/manual/ycm-using.7.rst -> UNKNOWN-0.12.3.dev35+dirty/help/manual
copying help/manual/ycm-variables.7.rst -> UNKNOWN-0.12.3.dev35+dirty/help/manual
copying help/module/AddInstallRPATHSupport.rst -> UNKNOWN-0.12.3.dev35+dirty/help/module
copying help/module/AddUninstallTarget.rst -> UNKNOWN-0.12.3.dev35+dirty/help/module
copying help/module/BuildECM.rst -> UNKNOWN-0.12.3.dev35+dirty/help/module
copying help/module/BuildEigen3.rst -> UNKNOWN-0.12.3.dev35+dirty/help/module
copying help/module/BuildGazeboYARPPlugins.rst -> UNKNOWN-0.12.3.dev35+dirty/help/module
copying help/module/BuildGooCanvas.rst -> UNKNOWN-0.12.3.dev35+dirty/help/module
copying help/module/BuildGooCanvasMM.rst -> UNKNOWN-0.12.3.dev35+dirty/help/module
copying help/module/BuildGtkDatabox.rst -> UNKNOWN-0.12.3.dev35+dirty/help/module
copying help/module/BuildGtkDataboxMM.rst -> UNKNOWN-0.12.3.dev35+dirty/help/module
copying help/module/BuildICUB.rst -> UNKNOWN-0.12.3.dev35+dirty/help/module
copying help/module/BuildTinyXML.rst -> UNKNOWN-0.12.3.dev35+dirty/help/module
copying help/module/BuildYARP.rst -> UNKNOWN-0.12.3.dev35+dirty/help/module
copying help/module/BuildqpOASES.rst -> UNKNOWN-0.12.3.dev35+dirty/help/module
copying help/module/CMakeParseArguments.rst -> UNKNOWN-0.12.3.dev35+dirty/help/module
copying help/module/ExternalProject.rst -> UNKNOWN-0.12.3.dev35+dirty/help/module
copying help/module/ExtractVersion.rst -> UNKNOWN-0.12.3.dev35+dirty/help/module
copying help/module/FindACE.rst -> UNKNOWN-0.12.3.dev35+dirty/help/module
copying help/module/FindAtlas.rst -> UNKNOWN-0.12.3.dev35+dirty/help/module
copying help/module/FindCFW2CANAPI.rst -> UNKNOWN-0.12.3.dev35+dirty/help/module
copying help/module/FindDRAGONFLYAPI.rst -> UNKNOWN-0.12.3.dev35+dirty/help/module
copying help/module/FindESDCANAPI.rst -> UNKNOWN-0.12.3.dev35+dirty/help/module
copying help/module/FindFTDI.rst -> UNKNOWN-0.12.3.dev35+dirty/help/module
copying help/module/FindFreenect.rst -> UNKNOWN-0.12.3.dev35+dirty/help/module
copying help/module/FindFuse.rst -> UNKNOWN-0.12.3.dev35+dirty/help/module
copying help/module/FindGLFW3.rst -> UNKNOWN-0.12.3.dev35+dirty/help/module
copying help/module/FindGLM.rst -> UNKNOWN-0.12.3.dev35+dirty/help/module
copying help/module/FindGLUT.rst -> UNKNOWN-0.12.3.dev35+dirty/help/module
copying help/module/FindGSL.rst -> UNKNOWN-0.12.3.dev35+dirty/help/module
copying help/module/FindGooCanvas.rst -> UNKNOWN-0.12.3.dev35+dirty/help/module
copying help/module/FindGooCanvasMM.rst -> UNKNOWN-0.12.3.dev35+dirty/help/module
copying help/module/FindGtkDatabox.rst -> UNKNOWN-0.12.3.dev35+dirty/help/module
copying help/module/FindGtkDataboxMM.rst -> UNKNOWN-0.12.3.dev35+dirty/help/module
copying help/module/FindI2C.rst -> UNKNOWN-0.12.3.dev35+dirty/help/module
copying help/module/FindIPOPT.rst -> UNKNOWN-0.12.3.dev35+dirty/help/module
copying help/module/FindIPP.rst -> UNKNOWN-0.12.3.dev35+dirty/help/module
copying help/module/FindLibOVR.rst -> UNKNOWN-0.12.3.dev35+dirty/help/module
copying help/module/FindLibdc1394.rst -> UNKNOWN-0.12.3.dev35+dirty/help/module
copying help/module/FindLibedit.rst -> UNKNOWN-0.12.3.dev35+dirty/help/module
copying help/module/FindLibusb1.rst -> UNKNOWN-0.12.3.dev35+dirty/help/module
copying help/module/FindLibv4l2.rst -> UNKNOWN-0.12.3.dev35+dirty/help/module
copying help/module/FindLibv4lconvert.rst -> UNKNOWN-0.12.3.dev35+dirty/help/module
copying help/module/FindNVIDIACg.rst -> UNKNOWN-0.12.3.dev35+dirty/help/module
copying help/module/FindODE.rst -> UNKNOWN-0.12.3.dev35+dirty/help/module
copying help/module/FindOpenCV.rst -> UNKNOWN-0.12.3.dev35+dirty/help/module
copying help/module/FindOpenGL.rst -> UNKNOWN-0.12.3.dev35+dirty/help/module
copying help/module/FindOpenNI.rst -> UNKNOWN-0.12.3.dev35+dirty/help/module
copying help/module/FindOrBuildPackage.rst -> UNKNOWN-0.12.3.dev35+dirty/help/module
copying help/module/FindPLXCANAPI.rst -> UNKNOWN-0.12.3.dev35+dirty/help/module
copying help/module/FindPortAudio.rst -> UNKNOWN-0.12.3.dev35+dirty/help/module
copying help/module/FindReadline.rst -> UNKNOWN-0.12.3.dev35+dirty/help/module
copying help/module/FindSQLite.rst -> UNKNOWN-0.12.3.dev35+dirty/help/module
copying help/module/FindStage.rst -> UNKNOWN-0.12.3.dev35+dirty/help/module
copying help/module/FindTinyXML.rst -> UNKNOWN-0.12.3.dev35+dirty/help/module
copying help/module/FindYamlCpp.rst -> UNKNOWN-0.12.3.dev35+dirty/help/module
copying help/module/Findassimp.rst -> UNKNOWN-0.12.3.dev35+dirty/help/module
copying help/module/FindqpOASES.rst -> UNKNOWN-0.12.3.dev35+dirty/help/module
copying help/module/GetAllCMakeProperties.rst -> UNKNOWN-0.12.3.dev35+dirty/help/module
copying help/module/GitInfo.rst -> UNKNOWN-0.12.3.dev35+dirty/help/module
copying help/module/IncludeUrl.rst -> UNKNOWN-0.12.3.dev35+dirty/help/module
copying help/module/InstallBasicPackageFiles.rst -> UNKNOWN-0.12.3.dev35+dirty/help/module
copying help/module/ReplaceImportedTargets.rst -> UNKNOWN-0.12.3.dev35+dirty/help/module
copying help/module/StandardFindModule.rst -> UNKNOWN-0.12.3.dev35+dirty/help/module
copying help/module/StyleBITBUCKET.rst -> UNKNOWN-0.12.3.dev35+dirty/help/module
copying help/module/StyleGITHUB.rst -> UNKNOWN-0.12.3.dev35+dirty/help/module
copying help/module/StyleGITLAB_ROBOTOLOGY.rst -> UNKNOWN-0.12.3.dev35+dirty/help/module
copying help/module/StyleGNOME.rst -> UNKNOWN-0.12.3.dev35+dirty/help/module
copying help/module/StyleKDE.rst -> UNKNOWN-0.12.3.dev35+dirty/help/module
copying help/module/StyleLOCAL.rst -> UNKNOWN-0.12.3.dev35+dirty/help/module
copying help/module/StyleNONE.rst -> UNKNOWN-0.12.3.dev35+dirty/help/module
copying help/module/StyleSOURCEFORGE.rst -> UNKNOWN-0.12.3.dev35+dirty/help/module
copying help/module/YCMDefaultDirs.rst -> UNKNOWN-0.12.3.dev35+dirty/help/module
copying help/module/YCMEPHelper.rst -> UNKNOWN-0.12.3.dev35+dirty/help/module
copying help/release/0.1.0.rst -> UNKNOWN-0.12.3.dev35+dirty/help/release
copying help/release/0.1.1.rst -> UNKNOWN-0.12.3.dev35+dirty/help/release
copying help/release/0.10.0.rst -> UNKNOWN-0.12.3.dev35+dirty/help/release
copying help/release/0.10.1.rst -> UNKNOWN-0.12.3.dev35+dirty/help/release
copying help/release/0.10.2.rst -> UNKNOWN-0.12.3.dev35+dirty/help/release
copying help/release/0.10.3.rst -> UNKNOWN-0.12.3.dev35+dirty/help/release
copying help/release/0.10.4.rst -> UNKNOWN-0.12.3.dev35+dirty/help/release
copying help/release/0.11.0.rst -> UNKNOWN-0.12.3.dev35+dirty/help/release
copying help/release/0.11.1.rst -> UNKNOWN-0.12.3.dev35+dirty/help/release
copying help/release/0.11.2.rst -> UNKNOWN-0.12.3.dev35+dirty/help/release
copying help/release/0.11.3.rst -> UNKNOWN-0.12.3.dev35+dirty/help/release
copying help/release/0.11.4.rst -> UNKNOWN-0.12.3.dev35+dirty/help/release
copying help/release/0.12.0.rst -> UNKNOWN-0.12.3.dev35+dirty/help/release
copying help/release/0.12.1.rst -> UNKNOWN-0.12.3.dev35+dirty/help/release
copying help/release/0.12.2.rst -> UNKNOWN-0.12.3.dev35+dirty/help/release
copying help/release/0.12.3.rst -> UNKNOWN-0.12.3.dev35+dirty/help/release
copying help/release/0.13.0.rst -> UNKNOWN-0.12.3.dev35+dirty/help/release
copying help/release/0.2.0.rst -> UNKNOWN-0.12.3.dev35+dirty/help/release
copying help/release/0.2.1.rst -> UNKNOWN-0.12.3.dev35+dirty/help/release
copying help/release/0.2.2.rst -> UNKNOWN-0.12.3.dev35+dirty/help/release
copying help/release/0.2.3.rst -> UNKNOWN-0.12.3.dev35+dirty/help/release
copying help/release/0.4.0.rst -> UNKNOWN-0.12.3.dev35+dirty/help/release
copying help/release/0.6.0.rst -> UNKNOWN-0.12.3.dev35+dirty/help/release
copying help/release/0.8.0.rst -> UNKNOWN-0.12.3.dev35+dirty/help/release
copying help/release/0.8.1.rst -> UNKNOWN-0.12.3.dev35+dirty/help/release
copying help/release/0.8.2.rst -> UNKNOWN-0.12.3.dev35+dirty/help/release
copying help/release/0.9.0.rst -> UNKNOWN-0.12.3.dev35+dirty/help/release
copying help/release/0.9.1.rst -> UNKNOWN-0.12.3.dev35+dirty/help/release
copying help/release/index.rst -> UNKNOWN-0.12.3.dev35+dirty/help/release
copying help/variable/YCM_USE_3RDPARTY.rst -> UNKNOWN-0.12.3.dev35+dirty/help/variable
copying help/variable/YCM_USE_CMAKE.rst -> UNKNOWN-0.12.3.dev35+dirty/help/variable
copying help/variable/YCM_USE_CMAKE_NEXT.rst -> UNKNOWN-0.12.3.dev35+dirty/help/variable
copying help/variable/YCM_USE_CMAKE_PROPOSED.rst -> UNKNOWN-0.12.3.dev35+dirty/help/variable
copying help/variable/YCM_USE_CMAKE_VERSION.rst -> UNKNOWN-0.12.3.dev35+dirty/help/variable
copying help/variable/YCM_USE_DEPRECATED.rst -> UNKNOWN-0.12.3.dev35+dirty/help/variable
copying internal-modules/README -> UNKNOWN-0.12.3.dev35+dirty/internal-modules
copying internal-modules/YCMInternal.cmake -> UNKNOWN-0.12.3.dev35+dirty/internal-modules
copying internal-modules/YCMPack.cmake -> UNKNOWN-0.12.3.dev35+dirty/internal-modules
copying internal-modules/YCMVersion.cmake -> UNKNOWN-0.12.3.dev35+dirty/internal-modules
copying modules/AddInstallRPATHSupport.cmake -> UNKNOWN-0.12.3.dev35+dirty/modules
copying modules/AddUninstallTarget.cmake -> UNKNOWN-0.12.3.dev35+dirty/modules
copying modules/CMakeLists.txt -> UNKNOWN-0.12.3.dev35+dirty/modules
copying modules/ExtractVersion.cmake -> UNKNOWN-0.12.3.dev35+dirty/modules
copying modules/FindOrBuildPackage.cmake -> UNKNOWN-0.12.3.dev35+dirty/modules
copying modules/GetAllCMakeProperties.cmake -> UNKNOWN-0.12.3.dev35+dirty/modules
copying modules/GitInfo.cmake -> UNKNOWN-0.12.3.dev35+dirty/modules
copying modules/IncludeUrl.cmake -> UNKNOWN-0.12.3.dev35+dirty/modules
copying modules/InstallBasicPackageFiles.cmake -> UNKNOWN-0.12.3.dev35+dirty/modules
copying modules/ReplaceImportedTargets.cmake -> UNKNOWN-0.12.3.dev35+dirty/modules
copying modules/StandardFindModule.cmake -> UNKNOWN-0.12.3.dev35+dirty/modules
copying modules/YCMEPHelper.cmake -> UNKNOWN-0.12.3.dev35+dirty/modules
copying style-modules/CMakeLists.txt -> UNKNOWN-0.12.3.dev35+dirty/style-modules
copying style-modules/StyleBITBUCKET.cmake -> UNKNOWN-0.12.3.dev35+dirty/style-modules
copying style-modules/StyleGITHUB.cmake -> UNKNOWN-0.12.3.dev35+dirty/style-modules
copying style-modules/StyleGITLAB_ROBOTOLOGY.cmake -> UNKNOWN-0.12.3.dev35+dirty/style-modules
copying style-modules/StyleGNOME.cmake -> UNKNOWN-0.12.3.dev35+dirty/style-modules
copying style-modules/StyleKDE.cmake -> UNKNOWN-0.12.3.dev35+dirty/style-modules
copying style-modules/StyleLOCAL.cmake -> UNKNOWN-0.12.3.dev35+dirty/style-modules
copying style-modules/StyleNONE.cmake -> UNKNOWN-0.12.3.dev35+dirty/style-modules
copying style-modules/StyleSOURCEFORGE.cmake -> UNKNOWN-0.12.3.dev35+dirty/style-modules
copying tests/CMakeLists.txt -> UNKNOWN-0.12.3.dev35+dirty/tests
copying tests/EnforceConfig.cmake.in -> UNKNOWN-0.12.3.dev35+dirty/tests
copying tests/test_clean.cmake.in -> UNKNOWN-0.12.3.dev35+dirty/tests
copying tests/RunCMake/CMakeLists.txt -> UNKNOWN-0.12.3.dev35+dirty/tests/RunCMake
copying tests/RunCMake/README.rst -> UNKNOWN-0.12.3.dev35+dirty/tests/RunCMake
copying tests/RunCMake/RunCMake.cmake -> UNKNOWN-0.12.3.dev35+dirty/tests/RunCMake
copying tests/RunCMake/RunCTest.cmake -> UNKNOWN-0.12.3.dev35+dirty/tests/RunCMake
copying tests/RunCMake/3rdparty/CMakeLists.txt -> UNKNOWN-0.12.3.dev35+dirty/tests/RunCMake/3rdparty
copying tests/RunCMake/3rdparty/RunCMakeTest.cmake -> UNKNOWN-0.12.3.dev35+dirty/tests/RunCMake/3rdparty
copying tests/RunCMake/3rdparty/find_package_Eigen3.cmake -> UNKNOWN-0.12.3.dev35+dirty/tests/RunCMake/3rdparty
copying tests/RunCMake/3rdparty/find_package_FFMPEG.cmake -> UNKNOWN-0.12.3.dev35+dirty/tests/RunCMake/3rdparty
copying tests/RunCMake/3rdparty/find_package_GLIB2.cmake -> UNKNOWN-0.12.3.dev35+dirty/tests/RunCMake/3rdparty
copying tests/RunCMake/3rdparty/find_package_GObject.cmake -> UNKNOWN-0.12.3.dev35+dirty/tests/RunCMake/3rdparty
copying tests/RunCMake/3rdparty/find_package_GStreamer.cmake -> UNKNOWN-0.12.3.dev35+dirty/tests/RunCMake/3rdparty
copying tests/RunCMake/3rdparty/find_package_GStreamerPluginsBase.cmake -> UNKNOWN-0.12.3.dev35+dirty/tests/RunCMake/3rdparty
copying tests/RunCMake/3rdparty/find_package_Graphviz.cmake -> UNKNOWN-0.12.3.dev35+dirty/tests/RunCMake/3rdparty
copying tests/RunCMake/3rdparty/find_package_Octave.cmake -> UNKNOWN-0.12.3.dev35+dirty/tests/RunCMake/3rdparty
copying tests/RunCMake/3rdparty/find_package_QCustomPlot.cmake -> UNKNOWN-0.12.3.dev35+dirty/tests/RunCMake/3rdparty
copying tests/RunCMake/3rdparty/include_CMakeRC.cmake -> UNKNOWN-0.12.3.dev35+dirty/tests/RunCMake/3rdparty
copying tests/RunCMake/3rdparty/include_Catch.cmake -> UNKNOWN-0.12.3.dev35+dirty/tests/RunCMake/3rdparty
copying tests/RunCMake/3rdparty/include_ParseAndAddCatchTests.cmake -> UNKNOWN-0.12.3.dev35+dirty/tests/RunCMake/3rdparty
copying tests/RunCMake/3rdparty/include_UseLATEX.cmake -> UNKNOWN-0.12.3.dev35+dirty/tests/RunCMake/3rdparty
copying tests/RunCMake/AddInstallRPATHSupport/AddInstallRPATHSupport_DEPENDS.cmake -> UNKNOWN-0.12.3.dev35+dirty/tests/RunCMake/AddInstallRPATHSupport
copying tests/RunCMake/AddInstallRPATHSupport/AddInstallRPATHSupport_target_append_install_rpath.cmake -> UNKNOWN-0.12.3.dev35+dirty/tests/RunCMake/AddInstallRPATHSupport
copying tests/RunCMake/AddInstallRPATHSupport/CMakeLists.txt -> UNKNOWN-0.12.3.dev35+dirty/tests/RunCMake/AddInstallRPATHSupport
copying tests/RunCMake/AddInstallRPATHSupport/RunCMakeTest.cmake -> UNKNOWN-0.12.3.dev35+dirty/tests/RunCMake/AddInstallRPATHSupport
copying tests/RunCMake/IncludeUrl/CMakeLists.txt -> UNKNOWN-0.12.3.dev35+dirty/tests/RunCMake/IncludeUrl
copying tests/RunCMake/IncludeUrl/IncludeUrl_DESTINATION.cmake -> UNKNOWN-0.12.3.dev35+dirty/tests/RunCMake/IncludeUrl
copying tests/RunCMake/IncludeUrl/IncludeUrl_DOWNLOAD_ALWAYS-result.txt -> UNKNOWN-0.12.3.dev35+dirty/tests/RunCMake/IncludeUrl
copying tests/RunCMake/IncludeUrl/IncludeUrl_DOWNLOAD_ALWAYS-stderr.txt -> UNKNOWN-0.12.3.dev35+dirty/tests/RunCMake/IncludeUrl
copying tests/RunCMake/IncludeUrl/IncludeUrl_DOWNLOAD_ALWAYS.cmake -> UNKNOWN-0.12.3.dev35+dirty/tests/RunCMake/IncludeUrl
copying tests/RunCMake/IncludeUrl/IncludeUrl_DOWNLOAD_NORMAL.cmake -> UNKNOWN-0.12.3.dev35+dirty/tests/RunCMake/IncludeUrl
copying tests/RunCMake/IncludeUrl/IncludeUrl_DOWNLOAD_ONCE.cmake -> UNKNOWN-0.12.3.dev35+dirty/tests/RunCMake/IncludeUrl
copying tests/RunCMake/IncludeUrl/IncludeUrl_ERROR_MD5-result.txt -> UNKNOWN-0.12.3.dev35+dirty/tests/RunCMake/IncludeUrl
copying tests/RunCMake/IncludeUrl/IncludeUrl_ERROR_MD5-stderr.txt -> UNKNOWN-0.12.3.dev35+dirty/tests/RunCMake/IncludeUrl
copying tests/RunCMake/IncludeUrl/IncludeUrl_ERROR_MD5.cmake -> UNKNOWN-0.12.3.dev35+dirty/tests/RunCMake/IncludeUrl
copying tests/RunCMake/IncludeUrl/IncludeUrl_ERROR_RETRIES_lessthanone-result.txt -> UNKNOWN-0.12.3.dev35+dirty/tests/RunCMake/IncludeUrl
copying tests/RunCMake/IncludeUrl/IncludeUrl_ERROR_RETRIES_lessthanone-stderr.txt -> UNKNOWN-0.12.3.dev35+dirty/tests/RunCMake/IncludeUrl
copying tests/RunCMake/IncludeUrl/IncludeUrl_ERROR_RETRIES_lessthanone.cmake -> UNKNOWN-0.12.3.dev35+dirty/tests/RunCMake/IncludeUrl
copying tests/RunCMake/IncludeUrl/IncludeUrl_ERROR_RETRIES_notanumber-result.txt -> UNKNOWN-0.12.3.dev35+dirty/tests/RunCMake/IncludeUrl
copying tests/RunCMake/IncludeUrl/IncludeUrl_ERROR_RETRIES_notanumber-stderr.txt -> UNKNOWN-0.12.3.dev35+dirty/tests/RunCMake/IncludeUrl
copying tests/RunCMake/IncludeUrl/IncludeUrl_ERROR_RETRIES_notanumber.cmake -> UNKNOWN-0.12.3.dev35+dirty/tests/RunCMake/IncludeUrl
copying tests/RunCMake/IncludeUrl/IncludeUrl_ERROR_SHA1-result.txt -> UNKNOWN-0.12.3.dev35+dirty/tests/RunCMake/IncludeUrl
copying tests/RunCMake/IncludeUrl/IncludeUrl_ERROR_SHA1-stderr.txt -> UNKNOWN-0.12.3.dev35+dirty/tests/RunCMake/IncludeUrl
copying tests/RunCMake/IncludeUrl/IncludeUrl_ERROR_SHA1.cmake -> UNKNOWN-0.12.3.dev35+dirty/tests/RunCMake/IncludeUrl
copying tests/RunCMake/IncludeUrl/IncludeUrl_ERROR_script.cmake -> UNKNOWN-0.12.3.dev35+dirty/tests/RunCMake/IncludeUrl
copying tests/RunCMake/IncludeUrl/IncludeUrl_ERROR_url-result.txt -> UNKNOWN-0.12.3.dev35+dirty/tests/RunCMake/IncludeUrl
copying tests/RunCMake/IncludeUrl/IncludeUrl_ERROR_url-stderr.txt -> UNKNOWN-0.12.3.dev35+dirty/tests/RunCMake/IncludeUrl
copying tests/RunCMake/IncludeUrl/IncludeUrl_ERROR_url.cmake -> UNKNOWN-0.12.3.dev35+dirty/tests/RunCMake/IncludeUrl
copying tests/RunCMake/IncludeUrl/IncludeUrl_MD5.cmake -> UNKNOWN-0.12.3.dev35+dirty/tests/RunCMake/IncludeUrl
copying tests/RunCMake/IncludeUrl/IncludeUrl_OPTIONAL_download_fail.cmake -> UNKNOWN-0.12.3.dev35+dirty/tests/RunCMake/IncludeUrl
copying tests/RunCMake/IncludeUrl/IncludeUrl_OPTIONAL_sha1_fail.cmake -> UNKNOWN-0.12.3.dev35+dirty/tests/RunCMake/IncludeUrl
copying tests/RunCMake/IncludeUrl/IncludeUrl_QUIET-stdout.txt -> UNKNOWN-0.12.3.dev35+dirty/tests/RunCMake/IncludeUrl
copying tests/RunCMake/IncludeUrl/IncludeUrl_QUIET.cmake -> UNKNOWN-0.12.3.dev35+dirty/tests/RunCMake/IncludeUrl
copying tests/RunCMake/IncludeUrl/IncludeUrl_RESULT_VARIABLE.cmake -> UNKNOWN-0.12.3.dev35+dirty/tests/RunCMake/IncludeUrl
copying tests/RunCMake/IncludeUrl/IncludeUrl_RETRIES-result.txt -> UNKNOWN-0.12.3.dev35+dirty/tests/RunCMake/IncludeUrl
copying tests/RunCMake/IncludeUrl/IncludeUrl_RETRIES-stderr.txt -> UNKNOWN-0.12.3.dev35+dirty/tests/RunCMake/IncludeUrl
copying tests/RunCMake/IncludeUrl/IncludeUrl_RETRIES-stdout.txt -> UNKNOWN-0.12.3.dev35+dirty/tests/RunCMake/IncludeUrl
copying tests/RunCMake/IncludeUrl/IncludeUrl_RETRIES.cmake -> UNKNOWN-0.12.3.dev35+dirty/tests/RunCMake/IncludeUrl
copying tests/RunCMake/IncludeUrl/IncludeUrl_SHA1.cmake -> UNKNOWN-0.12.3.dev35+dirty/tests/RunCMake/IncludeUrl
copying tests/RunCMake/IncludeUrl/IncludeUrl_SHA1_unix_eol.cmake -> UNKNOWN-0.12.3.dev35+dirty/tests/RunCMake/IncludeUrl
copying tests/RunCMake/IncludeUrl/IncludeUrl_SHA1_win.cmake -> UNKNOWN-0.12.3.dev35+dirty/tests/RunCMake/IncludeUrl
copying tests/RunCMake/IncludeUrl/IncludeUrl_SHA1_win_eol.cmake -> UNKNOWN-0.12.3.dev35+dirty/tests/RunCMake/IncludeUrl
copying tests/RunCMake/IncludeUrl/IncludeUrl_STATUS.cmake -> UNKNOWN-0.12.3.dev35+dirty/tests/RunCMake/IncludeUrl
copying tests/RunCMake/IncludeUrl/IncludeUrl_script.cmake -> UNKNOWN-0.12.3.dev35+dirty/tests/RunCMake/IncludeUrl
copying tests/RunCMake/IncludeUrl/IncludeUrl_url.cmake -> UNKNOWN-0.12.3.dev35+dirty/tests/RunCMake/IncludeUrl
copying tests/RunCMake/IncludeUrl/RunCMakeTest.cmake -> UNKNOWN-0.12.3.dev35+dirty/tests/RunCMake/IncludeUrl
copying tests/RunCMake/cmake-next/CMakeLists.txt -> UNKNOWN-0.12.3.dev35+dirty/tests/RunCMake/cmake-next
copying tests/RunCMake/cmake-next/RunCMakeTest.cmake -> UNKNOWN-0.12.3.dev35+dirty/tests/RunCMake/cmake-next
copying tests/RunCMake/cmake-next/find_package_Doxygen.cmake -> UNKNOWN-0.12.3.dev35+dirty/tests/RunCMake/cmake-next
copying tests/RunCMake/cmake-next/find_package_GLEW.cmake -> UNKNOWN-0.12.3.dev35+dirty/tests/RunCMake/cmake-next
copying tests/RunCMake/cmake-next/find_package_Matlab.cmake -> UNKNOWN-0.12.3.dev35+dirty/tests/RunCMake/cmake-next
copying tests/RunCMake/cmake-next/find_package_OpenGL.cmake -> UNKNOWN-0.12.3.dev35+dirty/tests/RunCMake/cmake-next
copying tests/RunCMake/cmake-next/find_package_Python.cmake -> UNKNOWN-0.12.3.dev35+dirty/tests/RunCMake/cmake-next
copying tests/RunCMake/cmake-next/find_package_Python2.cmake -> UNKNOWN-0.12.3.dev35+dirty/tests/RunCMake/cmake-next
copying tests/RunCMake/cmake-next/find_package_Python3.cmake -> UNKNOWN-0.12.3.dev35+dirty/tests/RunCMake/cmake-next
copying tests/RunCMake/cmake-next/find_package_SWIG.cmake -> UNKNOWN-0.12.3.dev35+dirty/tests/RunCMake/cmake-next
copying tests/RunCMake/cmake-next/include_CMakeParseArguments.cmake -> UNKNOWN-0.12.3.dev35+dirty/tests/RunCMake/cmake-next
copying tests/RunCMake/cmake-next/include_FeatureSummary.cmake -> UNKNOWN-0.12.3.dev35+dirty/tests/RunCMake/cmake-next
copying tests/RunCMake/cmake-next/include_UseSWIG.cmake -> UNKNOWN-0.12.3.dev35+dirty/tests/RunCMake/cmake-next
copying tests/RunCMake/cmake-next/include_WriteBasicConfigVersionFile.cmake -> UNKNOWN-0.12.3.dev35+dirty/tests/RunCMake/cmake-next
copying tests/RunCMake/cmake-next/swig_add_library.cmake -> UNKNOWN-0.12.3.dev35+dirty/tests/RunCMake/cmake-next
copying tests/RunCMake/cmake-next/swig_add_library.i -> UNKNOWN-0.12.3.dev35+dirty/tests/RunCMake/cmake-next
copying tests/YCMBootstrap/CMakeLists.txt -> UNKNOWN-0.12.3.dev35+dirty/tests/YCMBootstrap
copying tests/sha1sums/check_sha1sums.sh -> UNKNOWN-0.12.3.dev35+dirty/tests/sha1sums
copying tools/YCMBootstrap.cmake -> UNKNOWN-0.12.3.dev35+dirty/tools
copying tools/gen-gh-pages.sh -> UNKNOWN-0.12.3.dev35+dirty/tools
copying tools/update_sha1sums.sh -> UNKNOWN-0.12.3.dev35+dirty/tools
copying tools/installer/welcome.txt -> UNKNOWN-0.12.3.dev35+dirty/tools/installer
copying tools/installer/ycm.ico -> UNKNOWN-0.12.3.dev35+dirty/tools/installer
copying tools/installer/ycm_banner.bmp -> UNKNOWN-0.12.3.dev35+dirty/tools/installer
copying tools/installer/ycm_dialog.bmp -> UNKNOWN-0.12.3.dev35+dirty/tools/installer
copying tools/pip/README.md -> UNKNOWN-0.12.3.dev35+dirty/tools/pip
copying tools/pip/pyproject.toml -> UNKNOWN-0.12.3.dev35+dirty/tools/pip
copying tools/pip/setup.cfg -> UNKNOWN-0.12.3.dev35+dirty/tools/pip
copying tools/pip/setup.py -> UNKNOWN-0.12.3.dev35+dirty/tools/pip
Writing UNKNOWN-0.12.3.dev35+dirty/setup.cfg
Creating tar archive
removing 'UNKNOWN-0.12.3.dev35+dirty' (and everything under it)

You can modify the SDist command to collect the missing parts of the repo when it is building the SDist. Then you'll need to make sure the remaining accesses to the files work with the files in either location, since you can't be sure that sdist is always called first. Maybe there's a better way to do that, but that's what I've done in the past. A bit more is happening in pybind11's setup.py (including writing a new setup.py for each of two output packages), but that's part of it (in pybind11's case, it's not because it's in a subfolder, but IIRC the process is the same).

https://github.com/pybind/pybind11/blob/3b30b0a51e48a3273918f30dfb222db604cea5e9/setup.py#L63-L77

The reason I don't have a good example with the project fully in a subfolder is because I usually put the key bits of the project folder in the main directory, and then everything else related to the bindings in a "python" subfolder or similar. This is much easier, but does mean that three files (pyproject.toml, setup.cfg, and setup.py) have to sit in the top level of your project, which isn't always possible. Maybe someone else has a good example, I know it's a common design pattern.

setuptools_scm's root does not change the project root - it simply tells setuptools_scm where to find the repo. This option is useful only when you're not building from an sdist. It is always assumed that the project root is where the pyproject.toml file is. Therefore, the sdist will always be created with the folder the pyproject.toml is in as its root. If you can't place the contents of pip/tools at the root of the repo, then you'll need to find some way to do that temporarily when building the sdist (@RonnyPfannschmidt might have something to suggest :). All that aside, "__file__" is meaningless as the value of relative_to; a module's __file__ in Python is its path on disk; "__file__" in pyproject.toml is a file called "__file__" in the current directory!

@henryiii thanks a lot for the prompt reply!

The reason I don't have a good example with the project fully in a subfolder is because I usually put the key bits of the project folder in the main directory, and then everything else related to the bindings in a "python" subfolder or similar. This is much easier, but does mean that three files (pyproject.toml, setup.cfg, and setup.py) have to sit in the top level of your project, which isn't always possible. Maybe someone else has a good example, I know it's a common design pattern.

I'm used to keep the files in the top level of the repo when possible. This is not the case, we're trying to store them in a subfolder since PyPI support is community maintained. Funny enough, building wheels with the current structure works flawlessly, only the sdist are not fully working.

I checked the code of pypa/build and pypa/setuptools_scm, but I couldn't find the right entry point to understand how files are collected from the repository right before populating the tar archive. I'm not sure if I have to look for it either in build or setuptools_scm. It seems to me that the wrong folder is picked when creating the tar gz file and also the wrong content is written into the <name>.egg-info.SOURCES.txt file.

What I'm not 100% sure, is whether an sdist containing the whole repository (having the setup.py in a subfolder) could even work with pip install <name>.tar.gz. I suspect that this process expect to find a setup.py in the top level of the tar gz file. If this is true, then, probably any complex moving of top-level files into the subfolder would be overly complicated for the scope.

That should be handled by pep517, build is a frontend for that. Pip uses it too.

Is this about using files from a top level folder in a subfolder python package?

I think the package is in /tools/pip but it needs access to the whole repo to build. I see things like --use-feature=in-tree-build is required, etc.

@layday Thanks for the explanation, we replied almost together :)

setuptools_scm's root does not change the project root - it simply tells setuptools_scm where to find the repo. This option is useful only when you're not building from an sdist. It is always assumed that the project root is where the pyproject.toml file is. Therefore, the sdist will always be created with the folder the pyproject.toml is in as its root.

Thanks for this detail. I was suspecting the same in my previous comment. Therefore, I think what I'm trying to do is not that easy as I initially assumed.

If you can't place the contents of pip/tools at the root of the repo, then you'll need to find some way to do that temporarily when building the sdist (@RonnyPfannschmidt might have something to suggest :).

I'd love to hear other opinions or suggestions about it. I'll give some more thought about how this can be done without much effort.

All that aside, "__file__" is meaningless as the value of relative_to; a module's __file__ in Python is its path on disk; "__file__" in pyproject.toml is a file called "file" in the current directory!

I suspected this ๐Ÿ˜• I've already tried to move the logic to the setup.py, without any luck (due to what written above):

setup(
    use_scm_version=dict(
        root="../..",
        fallback_root="../..",
        relative_to=str(Path(__file__).absolute()),
        local_scheme="dirty-tag",
    ),
    # [...]

That should be handled by pep517, build is a frontend for that. Pip uses it too.

Thanks, I'll give a look to pep517 too!

Is this about using files from a top level folder in a subfolder python package?

Yes, the aim is to move the python-specific files in a subfolder. Wheels seem working fine, instead creating the sdist seems more problematic.

I think the package is in /tools/pip but it needs access to the whole repo to build. I see things like --use-feature=in-tree-build is required, etc.

AFAIK, this is necessary to prevent PEP517 to create a temp folder in /tmp with just the subfolder. In fact, in this case, there would not be any .git folder (since it's in the top-level) and setuptools_scm cannot detect the version.

Sdists have no concept of folders outside of their control

My understanding is that a setuptools extension would be necessary to support the mechanism

It may be easier to make a new git repo that uses a subrepo of the main libraries to control the structure

Today I managed to give a deeper look to @henryiii's suggestion in #322 (comment), particularly the custom sdist command used in pybind11.

Under the assumption that there is a git repo and the sdist package should contain all the content of the repo plus the egg metadata, the following custom sdist command provides the expected behavior. In short, I use GitPython to get all the repo files and I copy them in the tmp folder of the sdist before creating the archive.

import os
from pathlib import Path
from shutil import copy2
from typing import Generator, List

import git
import setuptools.command.sdist
import setuptools_scm.integration
from cmake_build_extension import BuildExtension, CMakeExtension
from setuptools import setup


# Use a custom sdist command to handle the storage of setup.cfg in a subfolder.
# It only supports creating the sdist from git repositories.
class SDist(setuptools.command.sdist.sdist):
    def make_release_tree(self, base_dir, files) -> None:

        # Build the setuptools_scm configuration, containing useful info for the sdist
        config: setuptools_scm.integration.Configuration = (
            setuptools_scm.integration.Configuration.from_file(
                dist_name=self.distribution.metadata.name
            )
        )

        # Get the root of the git repository
        repo_root = config.absolute_root

        # Prepare the release tree by calling the original method
        super(SDist, self).make_release_tree(base_dir=base_dir, files=files)

        # Copy the entire git repo in the subfolder containing setup.cfg
        for file in SDist.get_all_git_repo_files(repo_root=repo_root):

            src = Path(file)
            dst = Path(base_dir) / Path(file).relative_to(repo_root)

            # Make sure that the parent directory of the destination exists
            dst.absolute().parent.mkdir(parents=True, exist_ok=True)

            print(f"{Path(file)} -> {dst}")
            copy2(src=src, dst=dst)

        # Create the updated list of files included in the sdist
        all_files_gen = Path(base_dir).glob(pattern="**/*")
        all_files = [str(f.relative_to(base_dir)) for f in all_files_gen]

        # Find the SOURCES.txt file
        sources_txt_list = list(Path(base_dir).glob(pattern=f"*.egg-info/SOURCES.txt"))
        assert len(sources_txt_list) == 1

        # Update the SOURCES.txt files with the real content of the sdist
        os.unlink(sources_txt_list[0])
        with open(file=sources_txt_list[0], mode="w") as f:
            f.write("\n".join([str(f) for f in all_files]))

    @staticmethod
    def get_all_git_repo_files(repo_root: str, commit: str = None) -> List[Path]:

        # Create the git Repo object
        git_repo = git.Repo(path=repo_root)

        # Allow passing a custom commit
        commit = git_repo.commit() if commit is None else commit

        # Get all the files of the git repo recursively
        def list_paths(
            tree: git.Tree, path: Path = Path(".")
        ) -> Generator[Path, None, None]:

            for blob in tree.blobs:
                yield path / blob.name

            for tree in tree.trees:
                yield from list_paths(tree=tree, path=path / tree.name)

        # Return the list of absolute paths to all the git repo files
        return list(list_paths(tree=commit.tree, path=Path(repo_root)))


if (Path(".") / "CMakeLists.txt").exists():
    # Install from sdist
    source_dir = str(Path(".").absolute())
else:
    # Install from sources or build wheel
    source_dir = str(Path(".").absolute().parent.parent)

if "CIBUILDWHEEL" in os.environ and os.environ["CIBUILDWHEEL"] == "1":
    CIBW_CMAKE_OPTIONS = ["-DCMAKE_INSTALL_LIBDIR=lib"]
else:
    CIBW_CMAKE_OPTIONS = []

setup(
    cmdclass=dict(build_ext=BuildExtension, sdist=SDist),
    ext_modules=[
        CMakeExtension(
            name="CMakeProject",
            install_prefix="ycm_build_modules",
            disable_editable=True,
            write_top_level_init="",
            source_dir=source_dir,
            cmake_configure_options=[
                "-DBUILD_TESTING:BOOL=OFF",
                "-DYCM_NO_DEPRECATED:BOOL=ON",
            ]
            + CIBW_CMAKE_OPTIONS,
        ),
    ],
)

The only caveat is if build extensions like those used in this example require to know the location of files like CMakeLists.txt. It can be solved more or less in a clean way with a simple search rule (the if that sets source_dir).

Do you have any comment of this solution? It seems quite easy and it covers all the use-cases I can think right now.

The custom sdist command seems working fine. Thanks to everyone for the prompt support and suggestions ๐Ÿš€ Closing.