Hello Andi, Thanks for your note. It took quite some days of effort but I finally found a “golden path” to make a package out of PyLucene.
I had to do ‘make’ and ‘make test’ without the setup.cfg first. Otherwise 'make test' would dump a bunch of stuff into my specified install root in a temporary directory and then fail the tests entirely. After ‘make’ and ‘make test’ succeed, I then put the setup.cfg in the source folder and run ‘make install’ to get the files to be copied to the alternate root specified in the setup.cfg. Then I need to move and rename the folders copied to the alternate root to match what the install would normally do if it were allowed to install to the usual root destination, because install apparently behaves differently when given an alternate root. Then I copy the missing _lucene.py and native_libs.txt files from the source directory to the alternate root path. Finally I created a doinst.sh script which uses sed to add the proper path to easy-install.pth. Then I take everything in the alternate root and make a package out of it. In case it helps anyone I put the various build and script files in Dropbox, I’ll hopefully be submitting them to slackbuilds.org sometime soon. https://www.dropbox.com/sh/zsbw4uuhva2vy5h/AADKCmKyF-oOhKNTPiwppYELa I think the reason it is so hard to package PyLucene is that it is exceedingly free software, and doesn’t like to be locked up inside of a package :). Regards, —Ed On May 27, 2014, at 18:53, Andi Vajda <va...@apache.org> wrote: > > On Tue, 27 May 2014, Eduard Rozenberg wrote: > >> Hello folks, >> >> I?m working on packaging PyLucene to a Slackware >> package by using a setup.cfg in the source directory >> and redirecting the installation root to >> /tmp/pylucene_installdir. >> >> I noticed that a couple of files are missing when doing >> this alternate root install compared to the regular install. >> >> ########## setup.cfg ########### >> >> [easy_install] >> >> [build] >> >> [install] >> root = /tmp/pylucene_installdir >> compile = False >> force = True >> single-version-externally-managed = True >> >> ############################## >> >> I noticed that two files are missing when I do this root= >> install compared to the regular install to /usr/lib?/ >> Are these two files below not necessary when >> packaging PyLucene for distribution? >> >> Missing: native_libs.txt > > I don't know what this file, native_libs.txt, is for. Maybe a setuptools > artifact ? > >> ------------------------------ >> Contains: >> lucene/_lucene.so >> >> >> Missing: _lucene.py > > Yes, that one you need. > Did you try running pylucene tests without it ? > > Andi.. > >> -------------------------- >> Contains: >> def __bootstrap__(): >> global __bootstrap__, __loader__, __file__ >> import sys, pkg_resources, imp >> __file__ = pkg_resources.resource_filename(__name__, '_lucene.so') >> __loader__ = None; del __bootstrap__, __loader__ >> imp.load_dynamic(__name__,__file__) >> __bootstrap__() >> >> >> Thanks in advance! >> >> Regards, >> ?Ed