File: move-conda-package.py

package info (click to toggle)
py-stringmatching 0.4.2%2Bgit20201204.6a7fb57-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 1,632 kB
  • sloc: python: 4,000; makefile: 176
file content (19 lines) | stat: -rw-r--r-- 520 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import sys
import os
import yaml
import glob
import shutil

#try
#    from conda_build.config import config
#except ImportError:
from conda_build.config import Config # 03/03/2017: Updated based on the changes to conda_build.config
config = Config()

with open(os.path.join(sys.argv[1], 'meta.yaml')) as f:
    name = yaml.load(f)['package']['name']

binary_package_glob = os.path.join(config.bldpkgs_dir, '{0}*.tar.bz2'.format(name))
binary_package = glob.glob(binary_package_glob)[0]

shutil.move(binary_package, '.')