Hi Loic,

Looks heavy what you are trying to do... it is blowing my mind... Anyway,
- try to do an import setuptools on your Python console
If that package exists, it is very probable that it is a dependency of
another package used by your .rpm.
In my own experience, cx_Freeze is not 100% accurate resolving dependencies
of dependencies... (do not ask me why)... I got something similar and I
manually include all the packages, until my first built was sucessful!
... And to be sincere, I tried 3 converters before this one, and all others
were old and/or complicated. This is reaseable manageable! and the doc let
you do basic stuffs...

Regards,

Leandro


On Fri, Oct 20, 2017 at 6:47 PM, Loic Le Gal <l.legal.astel...@gmail.com>
wrote:

> Hi,
>
> First time I use cx_Freeze which seems to be a great tool.
> I try to pack a python project with Cython + cx_Freeze and generate a RPM
> to install is on a new host/VM.
>
> Packing is Ok, and I succeed in fixing some missing dependencies but when
> running the binary after a yum localinstalI of the RPM, I always get this
> error which seems to come from the oslo_log package:
>
> Traceback (most recent call last):
>   File "/usr/lib/python3.4/site-packages/pbr/version.py", line 441, in
> _get_version_from_pkg_resources
>   File "/usr/lib/python3.4/site-packages/pkg_resources/__init__.py", line
> 441, in get_provider
>   File "/usr/lib/python3.4/site-packages/pkg_resources/__init__.py", line
> 962, in require
>   File "/usr/lib/python3.4/site-packages/pkg_resources/__init__.py", line
> 849, in resolve
> pkg_resources.DistributionNotFound: The 'debtcollector' distribution was
> not found and is required by the application
>
> During handling of the above exception, another exception occurred:
>
> Traceback (most recent call last):
>   File 
> "/usr/lib64/python3.4/site-packages/cx_Freeze/initscripts/__startup__.py",
> line 14, in run
>   File "/usr/lib64/python3.4/site-packages/cx_Freeze/initscripts/Console.py",
> line 26, in run
>   File "vmon/app.py", line 7, in <module>
>   File "vmon/Main.py", line 36, in init vmon.Main
>   File "/usr/lib/python3.4/site-packages/oslo_log/log.py", line 41, in
> <module>
>   File "/usr/lib/python3.4/site-packages/oslo_config/cfg.py", line 498,
> in <module>
>   File "/usr/lib/python3.4/site-packages/debtcollector/__init__.py", line
> 20, in <module>
>   File "/usr/lib/python3.4/site-packages/pbr/version.py", line 466, in
> version_string
>   File "/usr/lib/python3.4/site-packages/pbr/version.py", line 461, in
> semantic_version
>   File "/usr/lib/python3.4/site-packages/pbr/version.py", line 447, in
> _get_version_from_pkg_resources
>   File "/usr/lib/python3.4/site-packages/pbr/packaging.py", line 33, in
> <module>
>   File "/usr/lib/python3.4/site-packages/setuptools/command/develop.py",
> line 9, in <module>
>   File "/usr/lib/python3.4/site-packages/setuptools/command/easy_install.py",
> line 47, in <module>
>   File "/usr/lib/python3.4/site-packages/setuptools/package_index.py",
> line 203, in <module>
>   File "/usr/lib/python3.4/site-packages/pkg_resources/__init__.py", line
> 962, in require
>   File "/usr/lib/python3.4/site-packages/pkg_resources/__init__.py", line
> 849, in resolve
> pkg_resources.DistributionNotFound: The 'setuptools' distribution was not
> found and is required by the application
>
> here is the cx_freeze section of my setup file where I add oslo_log to the
> namespace_packages as mentioned here (https://stackoverflow.com/
> questions/26821102/cx-freeze-cant-find-oslo-module):
> common_package = [
>     "paramiko",
>     "idna",
>     "yaml",
>     "cffi",
>     "oslo_log",
>     "oslo_config",
>     "oslo_utils",
>     "oslo_context",
>     "oslo_i18n",
>     "oslo_serialization",
>     "tornado",
>     "netifaces",
>     "cryptography",
>     "suds",
>     "transitions",
>     "debtcollector",
>     ]
> py2_package = ["Queue",]
> py3_package = ["queue",]
>
> packages = common_package + (py3_package if sys.version_info >= (3, 0)
> else py2_package)
>
> cx_setup(
>     executables=[Executable(
>         '%s/app.py' % common_kwargs["name"],
>         targetName="%s-app" % common_kwargs["name"]
>     )],
>     options = {
>         'build_exe': {
>             'packages': packages,
>             #'include_files': list_include_files_with_dir,
>             #'include_files': [
>             #    (os.path.join(DIR_PATH, "conf/parameters.json"),
> "conf/parameters.json"),
>             #],
>             'namespace_packages': ["oslo_log","oslo_config","oslo_utils"]
>         }
>     },
>     **common_kwargs
> )
>
> Also note that running on on a dev host where packing is done works
> correctly (with .so binaries used). May be I miss something...
>
> Thanks fo help!
>
> Loïc
>
> ------------------------------------------------------------
> ------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> cx-freeze-users mailing list
> cx-freeze-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/cx-freeze-users
>
>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
cx-freeze-users mailing list
cx-freeze-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cx-freeze-users

Reply via email to