def test_no_source(self): pkg1 = self.write_meta('pkg1', """ package: name: pkg1 version: 1.0 """) pkg1_resolved = ResolvedDistribution(pkg1, (())) builder = Builder(None, None, None, None, None) if hasattr(conda_build, 'api'): r = builder.build(pkg1_resolved, conda_build.api.Config()) else: r = builder.build(pkg1_resolved, conda_build.config.config) self.assertTrue(os.path.exists(r)) self.assertEqual(os.path.abspath(r), r) self.assertEqual(os.path.basename(r), 'pkg1-1.0-0.tar.bz2')
def test_no_source(self): pkg1 = self.write_meta('pkg1', """ package: name: pkg1 version: 1.0 """) pkg1_resolved = ResolvedDistribution(pkg1, (())) builder = Builder(None, None, None, None, None) r = builder.build(pkg1_resolved) self.assertTrue(os.path.exists(r)) self.assertEqual(os.path.abspath(r), r) self.assertEqual(os.path.basename(r), 'pkg1-1.0-0.tar.bz2')
def test_numpy_dep(self): pkg1 = self.write_meta('pkg1', """ package: name: pkg1 version: 1.0 requirements: build: - python - numpy x.x run: - python - numpy x.x """) pkg1_resolved = ResolvedDistribution(pkg1, (['python', '3.5'], ['numpy', '1.11'])) builder = Builder(None, None, None, None, None) if hasattr(conda_build, 'api'): r = builder.build(pkg1_resolved, conda_build.api.Config()) else: r = builder.build(pkg1_resolved, conda_build.config.config) self.assertTrue(os.path.exists(r)) self.assertEqual(os.path.abspath(r), r) self.assertEqual(os.path.basename(r), 'pkg1-1.0-np111py35_0.tar.bz2')
def test(self): pkg1 = self.write_meta( 'pkg1', """ package: name: pkg1 version: 1.0 """) pkg1_resolved = ResolvedDistribution(pkg1, (())) builder = Builder(None, None, None, None, None) r = builder.build(pkg1_resolved) self.assertTrue(os.path.exists(r)) self.assertEqual(os.path.abspath(r), r) self.assertEqual(os.path.basename(r), 'pkg1-1.0-0.tar.bz2')