def recipe_migration_win_compiled(config_yaml, py_recipe): os.makedirs(os.path.join(config_yaml, ".ci_support", "migrations"), exist_ok=True) with open( os.path.join(config_yaml, ".ci_support", "migrations", "vc-migrate.yaml"), "w") as fh: fh.write( dedent(""" migration_ts: 1.0 c_compiler: # [win] - vs2008 # [win] - vs2017 # [win] cxx_compiler: # [win] - vs2008 # [win] - vs2017 # [win] vc: # [win] - '9' # [win] - '14.1' # [win] zip_keys: - - python # [win] - c_compiler # [win] - cxx_compiler # [win] - vc # [win] """)) return RecipeConfigPair( str(config_yaml), _load_forge_config(config_yaml, exclusive_config_file=os.path.join( config_yaml, "recipe", "default_config.yaml")), )
def render_skipped_recipe(config_yaml, request): with open(os.path.join(config_yaml, "recipe", "meta.yaml"), "w") as fh: fh.write(""" package: name: python-noarch-test version: 1.0.0 build: noarch: python requirements: build: - python run: - python """) with open(os.path.join(config_yaml, "conda-forge.yml"), "a+") as fh: fh.write(""" skip_render: - .gitignore - .gitattributes - README.md - LICENSE.txt """) return RecipeConfigPair( str(config_yaml), _load_forge_config(config_yaml, exclusive_config_file=os.path.join( config_yaml, "recipe", "default_config.yaml")), )
def recipe_migration_cfep9(config_yaml, request): # write a migrator with open(os.path.join(config_yaml, "recipe", "meta.yaml"), "w") as fh: fh.write(""" package: name: py-test version: 1.0.0 requirements: host: - python - zlib run: - python about: home: home """) os.makedirs(os.path.join(config_yaml, ".ci_support", "migrations"), exist_ok=True) with open( os.path.join(config_yaml, ".ci_support", "migrations", "zlib.yaml"), "w") as fh: fh.write(""" zlib: - 1000 """) return RecipeConfigPair( str(config_yaml), _load_forge_config(config_yaml, exclusive_config_file=os.path.join( config_yaml, "recipe", "default_config.yaml")), )
def noarch_recipe(config_yaml, request): with open(os.path.join(config_yaml, "recipe", "meta.yaml"), "w") as fh: fh.write(""" package: name: python-noarch-test version: 1.0.0 build: noarch: python requirements: build: - python run: - python """) return RecipeConfigPair( str(config_yaml), _load_forge_config(config_yaml, exclusive_config_file=os.path.join( config_yaml, "recipe", "default_config.yaml")), )
def linux_skipped_recipe(config_yaml, request): with open(os.path.join(config_yaml, "recipe", "meta.yaml"), "w") as fh: fh.write(""" package: name: py-test version: 1.0.0 build: skip: True # [linux] requirements: build: - zlib about: home: home """) return RecipeConfigPair( str(config_yaml), _load_forge_config(config_yaml, exclusive_config_file=os.path.join( config_yaml, "recipe", "default_config.yaml")), )
def recipe_migration_cfep9_downgrade(config_yaml, recipe_migration_cfep9): # write a downgrade migrator that lives next to the current migrator. # Only this, more recent migrator should apply. os.makedirs(os.path.join(config_yaml, ".ci_support", "migrations"), exist_ok=True) with open( os.path.join(config_yaml, ".ci_support", "migrations", "zlib-downgrade.yaml"), "w") as fh: fh.write(""" migration_ts: 1.0 zlib: - 999 """) #return recipe_migration_cfep9 return RecipeConfigPair( str(config_yaml), _load_forge_config(config_yaml, exclusive_config_file=os.path.join( config_yaml, "recipe", "default_config.yaml")), )
def r_recipe(config_yaml, request): with open(os.path.join(config_yaml, "recipe", "meta.yaml"), "w") as fh: fh.write(""" package: name: r-test version: 1.0.0 build: skip: True # [win] requirements: build: - r-base run: - r-base """) return RecipeConfigPair( str(config_yaml), _load_forge_config(config_yaml, exclusive_config_file=os.path.join( config_yaml, "recipe", "default_config.yaml")), )
def upload_on_branch_recipe(config_yaml, request): with open(os.path.join(config_yaml, "recipe", "meta.yaml"), "w") as fh: fh.write(""" package: name: py-test version: 1.0.0 requirements: build: # [win] - {{ compiler('c') }} # [win] host: - python run: - python about: home: home """) return RecipeConfigPair( str(config_yaml), _load_forge_config(config_yaml, exclusive_config_file=os.path.join( config_yaml, "conda-forge.yml")), )