Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cookiecutting #33

Closed
wants to merge 16 commits into from
Closed

Cookiecutting #33

wants to merge 16 commits into from

Conversation

8bitsam
Copy link
Contributor

@8bitsam 8bitsam commented Jul 17, 2024

Use cookiecutter to restructure package.

@8bitsam
Copy link
Contributor Author

8bitsam commented Jul 17, 2024

Installing the package on editable mode currently fails on building wheels. This doesn't happen when installing without editable mode.

Building wheels for collected packages: diffpy.pdffit2
  Building editable for diffpy.pdffit2 (pyproject.toml) ... error
  error: subprocess-exited-with-error
  
  × Building editable for diffpy.pdffit2 (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [93 lines of output]
      <string>:49: UserWarning: Cannot detect name suffix for the 'boost_python' library. Consider setting LIBRARY_PATH.
      running editable_wheel
      creating /tmp/pip-wheel-lcfrhy4c/.tmp-78q3wyvn/diffpy.pdffit2.egg-info
      writing /tmp/pip-wheel-lcfrhy4c/.tmp-78q3wyvn/diffpy.pdffit2.egg-info/PKG-INFO
      writing dependency_links to /tmp/pip-wheel-lcfrhy4c/.tmp-78q3wyvn/diffpy.pdffit2.egg-info/dependency_links.txt
      writing top-level names to /tmp/pip-wheel-lcfrhy4c/.tmp-78q3wyvn/diffpy.pdffit2.egg-info/top_level.txt
      writing manifest file '/tmp/pip-wheel-lcfrhy4c/.tmp-78q3wyvn/diffpy.pdffit2.egg-info/SOURCES.txt'
      reading manifest file '/tmp/pip-wheel-lcfrhy4c/.tmp-78q3wyvn/diffpy.pdffit2.egg-info/SOURCES.txt'
      reading manifest template 'MANIFEST.in'
      warning: no files found matching '*' under directory 'diffpy'
      warning: no previously-included files matching '*.py[co]' found under directory 'diffpy'
      warning: no previously-included files matching '*.so' found under directory 'diffpy'
      warning: no files found matching '*.rst' under directory 'docs'
      warning: no files found matching 'conf.py' under directory 'docs'
      warning: no files found matching 'Makefile' under directory 'docs'
      warning: no files found matching 'make.bat' under directory 'docs'
      warning: no files found matching '*' under directory 'examples'
      warning: no files found matching 'diffpy.pdffit2/version.py'
      warning: no files found matching 'LICENSE'
      warning: no files found matching 'requirements/'
      warning: no previously-included files matching '.gitattributes' found anywhere in distribution
      warning: no previously-included files matching '.gitignore' found anywhere in distribution
      warning: no previously-included files matching '.gitarchive.cfg' found anywhere in distribution
      warning: no previously-included files matching '.DS_Store' found anywhere in distribution
      warning: no previously-included files matching '__pycache__' found under directory '*'
      warning: no previously-included files matching '*.py[co]' found under directory '*'
      warning: no previously-included files found matching 'setup.cfg'
      warning: no previously-included files found matching '.coveragerc'
      no previously-included directories found matching 'src/devutils'
      no previously-included directories found matching 'doc'
      adding license file 'LICENSE.rst'
      adding license file 'AUTHORS.rst'
      writing manifest file '/tmp/pip-wheel-lcfrhy4c/.tmp-78q3wyvn/diffpy.pdffit2.egg-info/SOURCES.txt'
      creating '/tmp/pip-wheel-lcfrhy4c/.tmp-78q3wyvn/diffpy.pdffit2-1.4.3.dist-info'
      creating /tmp/pip-wheel-lcfrhy4c/.tmp-78q3wyvn/diffpy.pdffit2-1.4.3.dist-info/WHEEL
      running build_py
      running build_ext
      Traceback (most recent call last):
        File "/tmp/pip-build-env-p6fk7siq/overlay/lib/python3.12/site-packages/setuptools/command/editable_wheel.py", line 153, in run
          self._create_wheel_file(bdist_wheel)
        File "/tmp/pip-build-env-p6fk7siq/overlay/lib/python3.12/site-packages/setuptools/command/editable_wheel.py", line 355, in _create_wheel_file
          files, mapping = self._run_build_commands(dist_name, unpacked, lib, tmp)
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-p6fk7siq/overlay/lib/python3.12/site-packages/setuptools/command/editable_wheel.py", line 278, in _run_build_commands
          self._run_build_subcommands()
        File "/tmp/pip-build-env-p6fk7siq/overlay/lib/python3.12/site-packages/setuptools/command/editable_wheel.py", line 305, in _run_build_subcommands
          self.run_command(name)
        File "/tmp/pip-build-env-p6fk7siq/overlay/lib/python3.12/site-packages/setuptools/_distutils/cmd.py", line 316, in run_command
          self.distribution.run_command(command)
        File "/tmp/pip-build-env-p6fk7siq/overlay/lib/python3.12/site-packages/setuptools/dist.py", line 974, in run_command
          super().run_command(command)
        File "/tmp/pip-build-env-p6fk7siq/overlay/lib/python3.12/site-packages/setuptools/_distutils/dist.py", line 989, in run_command
          cmd_obj.run()
        File "/tmp/pip-build-env-p6fk7siq/overlay/lib/python3.12/site-packages/setuptools/command/build_ext.py", line 96, in run
          self.copy_extensions_to_source()
        File "/tmp/pip-build-env-p6fk7siq/overlay/lib/python3.12/site-packages/setuptools/command/build_ext.py", line 117, in copy_extensions_to_source
          self.copy_file(regular_file, inplace_file, level=self.verbose)
        File "/tmp/pip-build-env-p6fk7siq/overlay/lib/python3.12/site-packages/setuptools/_distutils/cmd.py", line 354, in copy_file
          return file_util.copy_file(
                 ^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-p6fk7siq/overlay/lib/python3.12/site-packages/setuptools/_distutils/file_util.py", line 108, in copy_file
          raise DistutilsFileError(
      distutils.errors.DistutilsFileError: can't copy '/tmp/tmp9ufe16i7.build-lib/diffpy/pdffit2/pdffit2_ext.cpython-312-x86_64-linux-gnu.so': doesn't exist or not a regular file
      /tmp/pip-build-env-p6fk7siq/overlay/lib/python3.12/site-packages/setuptools/_distutils/dist.py:989: _DebuggingTips: Problem in editable installation.
      !!
      
              ********************************************************************************
              An error happened while installing `diffpy.pdffit2` in editable mode.
      
              The following steps are recommended to help debug this problem:
      
              - Try to install the project normally, without using the editable mode.
                Does the error still persist?
                (If it does, try fixing the problem before attempting the editable mode).
              - If you are using binary extensions, make sure you have all OS-level
                dependencies installed (e.g. compilers, toolchains, binary libraries, ...).
              - Try the latest version of setuptools (maybe the error was already fixed).
              - If you (or your project dependencies) are using any setuptools extension
                or customization, make sure they support the editable mode.
      
              After following the steps above, if the problem still persists and
              you think this is related to how setuptools handles editable installations,
              please submit a reproducible example
              (see https://stackoverflow.com/help/minimal-reproducible-example) to:
      
                  https://github.com/pypa/setuptools/issues
      
              See https://setuptools.pypa.io/en/latest/userguide/development_mode.html for details.
              ********************************************************************************
      
      !!
        cmd_obj.run()
      error: can't copy '/tmp/tmp9ufe16i7.build-lib/diffpy/pdffit2/pdffit2_ext.cpython-312-x86_64-linux-gnu.so': doesn't exist or not a regular file
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building editable for diffpy.pdffit2
Failed to build diffpy.pdffit2
ERROR: Could not build wheels for diffpy.pdffit2, which is required to install pyproject.toml-based projects

@sbillinge
Copy link
Contributor

This is way too much to review on one PR. Please can you commit files a few at a time. Ideally follow the instructions, so first commit the untracked files from the cookie cutter and so on. Let's try and keep ci passing as much as possible during this process.

@sbillinge sbillinge closed this Jul 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants