[PyQt] Help needed for eric6 development - support setup.py

Kyle Altendorf sda at fstab.net
Tue Apr 16 18:40:58 BST 2019


AFAIK wheels don't run anything.  That's one of the good things about 
them.  They just have data that can be put in the right place or 
otherwise processed.  Then installation doesn't involve arbitrary code 
execution.  The result is that all the custom stuff happens when 
creating the wheel.

I personally use versioneer to manage getting version info from git into 
Python.  Though some think it's important to have the version committed 
into the repo.

Cheers,
-kyle

On 2019-04-16 12:45, Detlev Offenbach wrote:
> Hello Grzegorz,
> 
> the VERSION file was meant to be created by a build script. Meanwhile I
> implemented something different. The idea with the 'build_py' is 
> interesting.
> There are some other files that need processing and potentially 
> reverting this
> change. Is there another command, that is called at the end of the 
> build?
> Maybe there is some documentation that explains, which commands are 
> called in
> which order. I intend to call it like
> 
> python3 setup.py bdist_wheel
> 
> Another observation I made is, that "pip install eric6.whl" does not 
> execute
> the 'install_data' or a 'install' command. Any suggestion for that?
> 
> Detlev
> 
> Am Montag, 15. April 2019, 22:43:24 CEST schrieb Grzegorz Bokota:
>> there is no VERSION file in the repository.
>> I also suggestto store __version__ varable in __init__.py of eric. The
>> allows to check it form imported lib.
>> Some code like:
>> 
>> def read(*parts):
>>     with codecs.open(os.path.join(current_dir, *parts), 'r') as fp:
>>         return fp.read()
>> 
>> 
>> def find_version(*file_paths):
>>     version_file = read(*file_paths)
>>     version_match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]",
>>                               version_file, re.M)
>>     if version_match:
>>         return version_match.group(1)
>>     raise RuntimeError("Unable to find version string.")
>> 
>> 
>> You put in one file
>> 
>> python_requires=">=3.5",
>> 
>> and
>> 
>> "Programming Language :: Python :: 2.7",
>> 
>> I add few fixes to setup.py to build ui files during build phase 
>> (lines
>> 96-118). Now, on my computer, it builds (When add VERSION file) and 
>> can be
>> installed with pip install ./eric6.
>> 
>> I do not use eric earler so i do not know how to test it.
>> I got warnings like  Warning: translation file 'qscintilla_pl_PL'could 
>> not
>> be loaded. on startup.
>> 
>> pon., 15 kwi 2019 o 18:43 Detlev Offenbach <detlev at die-offenbachs.de>
>> 
>> napisaƂ(a):
>> > Thanks Barry. Every example is useful.
>> >
>> > Detlev
>> >
>> > Am Sonntag, 14. April 2019, 22:52:46 CEST schrieb Barry:
>> > > > On 14 Apr 2019, at 18:36, Detlev Offenbach <detlev at die-offenbachs.de>
>> > > > wrote:
>> > > >
>> > > > Hello all,
>> > > >
>> > > > I would like to support distribution of eric6 via PyPI. This requires
>> >
>> > it
>> >
>> > > > to be packaged as a wheel via setuptools and a setup.py file.
>> > > > Unfortunately I am not familiar with this task. Nevertheless, I
>> > > > reorganized the eric 6 source tree and created a first setup.py file
>> >
>> > and
>> >
>> > > > packed everything into the 'setup.py' branch of the eric repository.
>> > > >
>> > > > Help with the setup.py file would be much appreciated. Please send
>> > > > patches/
>> > > > suggestions/tips, simply everything that makes this task done to me or
>> > > > these mailing lists.
>> > >
>> > > If your code is pure python it should be easy enough to package.
>> > >
>> > > Is this example usedul?
>> > > https://github.com/barry-scott/PythonWinAppPackager/blob/master/setup.py
>> > >
>> > > Barry
>> > >
>> > > > Regards,
>> > > > Detlev
>> > > >
>> > > > PS: Who to checkout the repository is explained on the eric web site
>> > > > (https:// eric-ide.python-projects.org).
>> >
>> > --
>> > Detlev Offenbach
>> > detlev at die-offenbachs.de
>> >
>> >
>> > _______________________________________________
>> > PyQt mailing list    PyQt at riverbankcomputing.com
>> > https://www.riverbankcomputing.com/mailman/listinfo/pyqt


More information about the PyQt mailing list