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

create-dmg/x.x.x: change support location #11569

Merged
merged 5 commits into from
Jul 25, 2022

Conversation

MartinDelille
Copy link
Contributor

Specify library name and version: create-dmg

This is also a good place to share with all of us why you are submitting this PR (specially if it is a new addition to ConanCenter): is it a dependency of other libraries you want to package? Are you the author of the library? Thanks!


  • I've read the guidelines for contributing.
  • I've followed the PEP8 style guides for Python code in the recipes.
  • I've used the latest Conan client version.
  • I've tried at least one configuration locally with the conan-center hook activated.

@conan-center-bot

This comment has been minimized.


@property
def _source_subfolder(self):
return "source_subfolder"

def export_sources(self):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did this in order to be able to patch create-dmg to properly access to the support directory: https://github.com/conan-io/conan-center-index/pull/11569/files#diff-70f9e2e6516706b1b866dc40b6094b688fa797d9d698871b83399d82e54e371e

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@uilianries How can I properly patch a tool package ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Follow the pattern that is showed in the link. Any patch should be applied on build step as always.

@MartinDelille
Copy link
Contributor Author

@uilianries Unfortunately, when removing the export_sources and source method, the patch file is innaccessible:

conan export create-dmg/all create-dmg/1.1.0@
Exporting package recipe
create-dmg/1.1.0 exports: File 'conandata.yml' found. Exporting it...
create-dmg/1.1.0 exports: Copied 1 '.yml' file: conandata.yml
create-dmg/1.1.0: A new conanfile.py version was exported
create-dmg/1.1.0: Folder: /Users/martin/.conan/data/create-dmg/1.1.0/_/_/export
create-dmg/1.1.0: Package recipe modified in export, forcing source folder removal
create-dmg/1.1.0: Use the --keep-source, -k option to skip it
create-dmg/1.1.0: Exported revision: e256052a9a1cbf1c8ceac235ac126877
conan test create-dmg/all/test_package create-dmg/1.1.0 -b create-dmg --profile Darwin.txt
Configuration:
[settings]
arch=x86_64
build_type=Release
compiler=apple-clang
compiler.libcxx=libc++
compiler.version=13.1
os=Macos
os.version=10.14
[options]
[build_requires]
[env]

create-dmg/1.1.0: Forced build from source
create-dmg/1.1.0 (test package): Installing package
Requirements
    create-dmg/1.1.0 from local cache - Cache
Packages
    create-dmg/1.1.0:5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9 - Build

Installing (downloading, building) binaries...
create-dmg/1.1.0: WARN: Build folder is dirty, removing it: /Users/martin/.conan/data/create-dmg/1.1.0/_/_/build/5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9
create-dmg/1.1.0: Configuring sources in /Users/martin/.conan/data/create-dmg/1.1.0/_/_/source
create-dmg/1.1.0: Copying sources to build folder
create-dmg/1.1.0: Building your package in /Users/martin/.conan/data/create-dmg/1.1.0/_/_/build/5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9
create-dmg/1.1.0: Generator txt created conanbuildinfo.txt
create-dmg/1.1.0: Aggregating env generators
create-dmg/1.1.0: Calling build()
Downloading v1.1.0.tar.gz completed [44.58k]

create-dmg/1.1.0:
create-dmg/1.1.0: ERROR: Package '5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9' build failed
create-dmg/1.1.0: WARN: Build folder /Users/martin/.conan/data/create-dmg/1.1.0/_/_/build/5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9
ERROR: create-dmg/1.1.0: Error in build() method, line 29
	tools.patch(**patch)
	FileNotFoundError: [Errno 2] No such file or directory: 'patches/0001-change-share-to-res.patch'
make: *** [test] Error 1

@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

Co-authored-by: Uilian Ries <uilianries@gmail.com>
@conan-center-bot
Copy link
Collaborator

All green in build 4 (a620b7e581005be02a878908210f4a5f5dee49cc):

  • create-dmg/1.1.0@:
    All packages built successfully! (All logs)

    🔸 Informative: This recipe is not ready for Conan v2

    We have started the migration process to Conan v2 and exporting recipes successfully will be required in the future.
    This is just an informative note to gain awareness about the process, no need to take any action. The plan is to enforce smaller steps that are easier to fix and, eventually, this conan export step will work.
    See the recipe migration guide to know more about the changes required.

    ERROR: Error loading conanfile at '/home/conan/w/prod_cci_PR-11569/recipes/create-dmg/all/conanfile.py': Unable to load conanfile in /home/conan/w/prod_cci_PR-11569/recipes/create-dmg/all/conanfile.py
      File "<frozen importlib._bootstrap_external>", line 728, in exec_module
      File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
      File "/home/conan/w/prod_cci_PR-11569/recipes/create-dmg/all/conanfile.py", line 2, in <module>
        from conans import ConanFile, tools
    ImportError: cannot import name 'ConanFile' from 'conans' (/opt/pyenv/versions/3.7.13/lib/python3.7/site-packages/conans/__init__.py)
    
  • create-dmg/1.0.10@:
    All packages built successfully! (All logs)

    🔸 Informative: This recipe is not ready for Conan v2

    We have started the migration process to Conan v2 and exporting recipes successfully will be required in the future.
    This is just an informative note to gain awareness about the process, no need to take any action. The plan is to enforce smaller steps that are easier to fix and, eventually, this conan export step will work.
    See the recipe migration guide to know more about the changes required.

    ERROR: Error loading conanfile at '/home/conan/w/prod_cci_PR-11569/recipes/create-dmg/all/conanfile.py': Unable to load conanfile in /home/conan/w/prod_cci_PR-11569/recipes/create-dmg/all/conanfile.py
      File "<frozen importlib._bootstrap_external>", line 728, in exec_module
      File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
      File "/home/conan/w/prod_cci_PR-11569/recipes/create-dmg/all/conanfile.py", line 2, in <module>
        from conans import ConanFile, tools
    ImportError: cannot import name 'ConanFile' from 'conans' (/opt/pyenv/versions/3.7.13/lib/python3.7/site-packages/conans/__init__.py)
    

Copy link
Member

@uilianries uilianries left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@conan-center-bot conan-center-bot merged commit c946355 into conan-io:master Jul 25, 2022
@MartinDelille MartinDelille deleted the create-dmg branch July 25, 2022 18:48
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.

None yet

4 participants