Skip to content

Commit

Permalink
Merge pull request #68 from mwcraig/fix-conda-build-1-compat
Browse files Browse the repository at this point in the history
Fix a couple compatibility issues with conda build 1.x
  • Loading branch information
pelson authored Dec 16, 2016
2 parents 4afd09b + 323db66 commit b70616e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
5 changes: 4 additions & 1 deletion conda_build_all/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,10 @@ def build(meta, test=True):

def upload(cli, meta, owner, channels=['main'], config=None):
"""Upload a distribution, given the build metadata."""
fname = bldpkg_path(meta, config)
if hasattr(conda_build, 'api'):
fname = bldpkg_path(meta, config)
else:
fname = bldpkg_path(meta)
package_type = detect_package_type(fname)
package_attrs, release_attrs, file_attrs = get_attrs(package_type, fname)
package_name = package_attrs['name']
Expand Down
6 changes: 5 additions & 1 deletion conda_build_all/builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,11 @@

def package_built_name(package, root_dir):
package_dir = os.path.join(root_dir, package)
return conda_build.api.get_output_file_path(package_dir)
if hasattr(conda_build, 'api'):
return conda_build.api.get_output_file_path(package_dir)
else:
meta = MetaData(package_dir)
return bldpkg_path(meta)


def distribution_exists(binstar_cli, owner, metadata):
Expand Down

0 comments on commit b70616e

Please sign in to comment.