Esempio n. 1
0
    def test_add_requirements(self):
        md = Metadata()
        md.name = 'bar'
        md.version = '0.5'
        md.add_requirements(['foo (0.1.2)'])
        self.assertEqual(md.run_requires, [{ 'requires': ['foo (0.1.2)']}])

        fn = os.path.join(HERE, 'fake_dists', 'choxie-2.0.0.9.dist-info',
                          'METADATA')
        md = Metadata(path=fn)
        md.add_requirements(['foo (0.1.2)'])
        self.assertEqual(set(md.run_requires),
                         set(['towel-stuff (0.1)', 'nut', 'foo (0.1.2)']))
Esempio n. 2
0
    def test_add_requirements(self):
        md = Metadata()
        md.name = 'bar'
        md.version = '0.5'
        md.add_requirements(['foo (0.1.2)'])
        self.assertEqual(md.run_requires, [{'requires': ['foo (0.1.2)']}])

        fn = os.path.join(HERE, 'fake_dists', 'choxie-2.0.0.9.dist-info',
                          LEGACY_METADATA_FILENAME)
        md = Metadata(path=fn)
        md.add_requirements(['foo (0.1.2)'])
        self.assertEqual(set(md.run_requires),
                         set(['towel-stuff (0.1)', 'nut', 'foo (0.1.2)']))
Esempio n. 3
0
 def wheel_modifier(self, path_map):
     mdpath = path_map['dummy-0.1.dist-info/%s' % LEGACY_METADATA_FILENAME]
     md = Metadata(path=mdpath)
     md.add_requirements(['numpy'])
     md.write(path=mdpath, legacy=True)
     return True
Esempio n. 4
0
 def wheel_modifier(self, path_map):
     mdpath = path_map["dummy-0.1.dist-info/pydist.json"]
     md = Metadata(path=mdpath)
     md.add_requirements(["numpy"])
     md.write(path=mdpath)
     return True
Esempio n. 5
0
 def wheel_modifier(self, path_map):
     mdpath = path_map['dummy-0.1.dist-info/pydist.json']
     md = Metadata(path=mdpath)
     md.add_requirements(['numpy'])
     md.write(path=mdpath)
     return True