On Sat, 23 Aug 2014 22:30:56 +0200
Michał Górny <mgo...@gentoo.org> wrote:

> ---
>  .gitignore           |   1 +
>  MANIFEST.in          |  19 ++
>  Makefile             | 215 -------------------
>  doc/Makefile         |  11 -
>  mkrelease.sh         | 141 -------------
>  pym/portage/const.py |   4 +-
>  setup.py             | 578
> +++++++++++++++++++++++++++++++++++++++++++++++++++ 7 files changed,
> 600 insertions(+), 369 deletions(-) create mode 100644 MANIFEST.in
>  delete mode 100644 Makefile
>  delete mode 100644 doc/Makefile
>  delete mode 100755 mkrelease.sh
>  create mode 100755 setup.py
> 
>
> FIXME: not used diff --git a/setup.py b/setup.py new file mode 100755
> index 0000000..7ffe7f0 --- /dev/null
> +++ b/setup.py

...

> +
> +class docbook(Command):
> +     """ Build docs using docbook. """
> +
> +     user_options = [
> +             ('doc-formats=', None, 'Documentation formats to
> build (all xmlto formats for docbook are allowed, comma-separated'),
> +     ]
> +
> +     def initialize_options(self):
> +             self.doc_formats = 'xhtml,xhtml-nochunks'
> +
> +     def finalize_options(self):
> +             self.doc_formats = self.doc_formats.replace(',', '
> ').split() +
> +     def run(self):
> +             with open('doc/fragment/date', 'w'):
> +                     pass
> +
> +             for f in self.doc_formats:
> +                     print('Building docs in %s format...' % f)
> +                     subprocess.check_call(['xmlto', '-o', 'doc',
> +                             '-m', 'doc/custom.xsl', f,
> 'doc/portage.docbook']) +
> +
> +class epydoc(Command):
> +     """ Build API docs using epydoc. """
> +
> +     user_options = [
> +     ]
> +
> +     def initialize_options(self):
> +             self.build_lib = None
> +
> +     def finalize_options(self):
> +             self.set_undefined_options('build_py', ('build_lib',
> 'build_lib')) +
> +     def run(self):
> +             self.run_command('build_py')
> +
> +             print('Building API documentation...')
> +
> +             process_env = os.environ.copy()
> +             pythonpath = self.build_lib
> +             try:
> +                     pythonpath += ':' + process_env['PYTHONPATH']
> +             except KeyError:
> +                     pass
> +             process_env['PYTHONPATH'] = pythonpath
> +
> +             subprocess.check_call(['epydoc', '-o', 'epydoc',
> +                     '--name', self.distribution.get_name(),
> +                     '--url', self.distribution.get_url(),
> +                     '-qq', '--no-frames', '--show-imports',
> +                     '--exclude', 'portage.tests',
> +                     '_emerge', 'portage', 'repoman'],
> +                     env = process_env)
> +             os.remove('epydoc/api-objects.txt')
> +
> +
> +class install_docbook(install_data):
> +     """ install_data for docbook docs """
> +
> +     user_options = install_data.user_options
> +
> +     def initialize_options(self):
> +             install_data.initialize_options(self)
> +             self.htmldir = None
> +
> +     def finalize_options(self):
> +             self.set_undefined_options('install', ('htmldir',
> 'htmldir'))
> +             install_data.finalize_options(self)
> +
> +     def run(self):
> +             if not os.path.exists('doc/portage.html'):
> +                     self.run_command('docbook')
> +             self.data_files = [
> +                     (self.htmldir, glob.glob('doc/*.html')),
> +             ]
> +             install_data.run(self)
> +
> +
> +class install_epydoc(install_data):
> +     """ install_data for epydoc docs """
> +
> +     user_options = install_data.user_options
> +
> +     def initialize_options(self):
> +             install_data.initialize_options(self)
> +             self.htmldir = None
> +
> +     def finalize_options(self):
> +             self.set_undefined_options('install', ('htmldir',
> 'htmldir'))
> +             install_data.finalize_options(self)
> +
> +     def run(self):
> +             if not os.path.exists('epydoc/index.html'):
> +                     self.run_command('epydoc')
> +             self.data_files = [
> +                     (os.path.join(self.htmldir, 'api'),
> glob.glob('epydoc/*')),
> +             ]
> +             install_data.run(self)
> +
> +
> 

Both doc and epydoc use flags, install is broken and fails with
permission denied error to create the /usr/share/.../portage-9999
directory.

...

> +setup(
> +     name = 'portage',
> +     version = '2.2.12',

You've changed it to 2.2.13_pre1 in git.  But it produces incorrect
portage-2.2.13_pre1.egginfo version for an otherwise tagged/versioned
9999 install.

So set this to 9999 in git and reset to the correct value for a release
only it looks like.

> +     url = 'https://wiki.gentoo.org/wiki/Project:Portage',
> +     author = 'Gentoo Portage Development Team',
> +     author_email = 'dev-port...@gentoo.org',
> +
...


Also, setup.py sdist does not produce an installable tarball.  It keeps
failing with unicode decode errors on various files on the different
target pythons.

eg:
copying and adjusting bin/fixpackages
-> 
/var/tmp/portage/sys-apps/portage-2.2.13_pre2/work/portage-2.2.13_pre2-python2_7/scripts/sbin/
Traceback (most recent call last): File
"/usr/lib64/python3.2/tokenize.py", line 298, in find_cookie
line_string = line.decode('utf-8') UnicodeDecodeError: 'utf-8' codec
can't decode byte 0xee in position 0: invalid continuation byte

-------------------------------

I have changed the version to 9999 and rebased your new-install branch
on currrent master, and pushed it to my github account.

https://github.com/dol-sen/portage

I also am attaching the ebuilds I edited slightly

I have uploaded the 2.2.13_pre1 and _pre2 tarballs to my dev space.
_pre2 differs from _pre1 in that _pre2 is with the rebased git sources,
while _pre1 is Michal's original branch code.

you can rename the _pre2.ebuild to _pre1.ebuild to test at your
pleasure.

-- 
Brian Dolbec <dolsen>

Attachment: portage-9999.ebuild
Description: Binary data

Attachment: portage-2.2.13_pre2.ebuild
Description: Binary data

Reply via email to