~akretion-team/anybox.recipe.openerp/git-shallow-clone

« back to all changes in this revision

Viewing changes to anybox/recipe/openerp/base.py

  • Committer: Raphaël Valyi
  • Date: 2014-07-18 05:33:47 UTC
  • Revision ID: rvalyi@gmail.com-20140718053347-ey3kc6ldq2rj2epf
working version with pip; hacky though

Show diffs side-by-side

added added

removed removed

Lines of Context:
277
277
        If some distributions are known as soft requirements, will retry
278
278
        without them
279
279
        """
280
 
        eggs = "\n".join([i for i in self.options['eggs'].split(os.linesep) if i not in ['Pillow']])
 
280
        eggs = "\n".join([i for i in self.options['eggs'].split(os.linesep) if i not in ['Pillow', 'openerp', 'pychart', 'anybox.recipe.openerp', 'anybox']])
281
281
        requirement_file = os.path.join(os.getcwd(), 'odoo_requirements.txt')
282
282
        with open(requirement_file, 'w') as the_file:
283
 
            the_file.write('-find-links=http://download.gna.org/pychart\n')
 
283
            the_file.write('--find-links=http://download.gna.org/pychart\n')
284
284
            the_file.write(eggs)
285
285
        subprocess.call(['pip', 'install', '-r', requirement_file])
286
 
        while False:#True:
 
286
        print "µµµµµµµµµµµµµµµµµµµµµµµµµµ DONE!!!"
 
287
        while True:
287
288
            missing = None
288
289
            eggs = zc.recipe.egg.Scripts(self.buildout, '', self.options)
289
290
            try:
290
 
                eggs.install()
 
291
                pass
 
292
#                eggs.install()
291
293
            except MissingDistribution, exc:
292
294
                missing = exc.data[0].project_name
293
295
            except VersionConflict:
296
298
                missing = exc.message.split(os.linesep)[0].split()[-1]
297
299
 
298
300
            if missing is not None:
299
 
                msg = self.missing_deps_instructions.get(missing)
300
 
                if msg is None:
301
 
                    raise
302
 
                logger.error("Could not find %r. " + msg, missing)
 
301
#                msg = self.missing_deps_instructions.get(missing)
 
302
#                if msg is None:
 
303
#                    raise
 
304
#                logger.error("Could not find %r. " + msg, missing)
303
305
                # GR this condition won't be enough in case of version
304
306
                # conditions in requirement
305
307
                if missing not in self.soft_requirements:
311
313
            else:
312
314
                break
313
315
 
314
 
        self.eggs_reqs, self.eggs_ws = eggs.working_set()
 
316
        self.eggs_reqs, self.eggs_ws = [], []#eggs.working_set()
315
317
        self.ws = self.eggs_ws
316
318
 
317
319
    def apply_version_dependent_decisions(self):
822
824
            raise EnvironmentError('Version of OpenERP could not be detected')
823
825
        self.merge_requirements()
824
826
        self.install_requirements()
825
 
 
826
827
        self._install_startup_scripts()
827
828
 
828
829
        # create the config file