EDIT: Кажется, что setup.py предназначено для создания пакета для Mac OSX с py2app. Итак, теперь встает вопрос: как мне запретить плагин python snapcraft вызывать setup.py?
Я пытаюсь создать привязку для приложения python, как для изучения оснастки, так и потому, что это приложение существует только как пакет 14.04 deb, который не будет установлен в моей более поздней системе. Заметьте, что я довольно новичок в python и totaly new для snaps ...
Приложение Iramuteq, from iramuteq.org
Существующий файл deb [[F5]] выглядит так: :
Source: iramuteq
Standards-Version: 0.1.8
Section: science
Priority: extra
Maintainer: Pierre Ratinaud <ratinaud@univ-tlse2.fr>
Build-Depends: debhelper (>= 7)
Homepage: http://www.iramuteq.org
Package: iramuteq
Architecture: all
Depends: python (>= 2.7), r-base (>= 3.0.0), python-wxgtk2.8 (>= 2.8), python-xlrd (>= 0.6), python-ooolib, r-cran-rgl (>= 0.79)
Description: Interface de R pour les analyses multidimensionnelles
Итак, как я понимаю, мне нужны библиотеки python, и я должен вставить пакет r-cran-rgl.
Вот файл snapcraft.yaml I придумал:
name: iramuteq # you probably want to 'snapcraft register <name>'
version: '0.7-alpha2' # just for humans, typically '1.2+git' or '1.3.2'
summary: R INTERFACE for multidimensional analysis of texts and questionnaires # 79 char long summary
description: |
IRAMUTEQ is a GNU GPL (v2) licensed software that provides users with
statistical analysis on text corpus and tables composed by individuals/words.
It is based on R software and on python language.
grade: devel # must be 'stable' to release into candidate/stable channels
confinement: devmode # use 'strict' once you have the right plugs and slots
apps:
iramuteq:
command: iramuteq
parts:
iramuteq:
source: http://www.iramuteq.org/git/iramuteq
source-type: git
plugin: python
python-version: 'python2'
python-packages:
- ooolib
- xlrd
- wxgtk2.8
stage-packages:
- r-base # (>= 3.0.0)
- r-cran-rgl #(>= 0.79)
Запустив snapcraft, я получаю следующую ошибку:
Processing /home/franck/iramuteq/snap/parts/iramuteq/src
Link is a directory, ignoring download_dir
Complete output from command python setup.py egg_info:
warning: no directories found matching 'doc/_static'
warning: no directories found matching 'doc/_templates'
warning: no previously-included files matching '.DS_Store' found anywhere in distribution
warning: no previously-included files matching '*.pyc' found anywhere in distribution
warning: no previously-included files matching '*.pyo' found anywhere in distribution
warning: no previously-included files matching '*.so' found anywhere in distribution
warning: no previously-included files matching '*.dSYM' found anywhere in distribution
warning: no previously-included files matching '*.dSYM/*' found anywhere in distribution
warning: no previously-included files matching '*__pycache__*' found anywhere in distribution
no previously-included directories found matching 'examples/*/build'
no previously-included directories found matching 'examples/*/dist'
no previously-included directories found matching 'examples/*/*/build'
no previously-included directories found matching 'examples/*/*/dist'
no previously-included directories found matching 'examples/*/*/*/build'
no previously-included directories found matching 'examples/*/*/*/dist'
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-9UlL_H-build/setup.py", line 21, in <module>
setup_requires=['py2app'],
File "/home/franck/iramuteq/snap/parts/iramuteq/install/usr/lib/python2.7/distutils/core.py", line 111, in setup
_setup_distribution = dist = klass(attrs)
File "/home/franck/iramuteq/snap/parts/iramuteq/install/lib/python2.7/site-packages/setuptools/dist.py", line 317, in __init__
self.fetch_build_eggs(attrs['setup_requires'])
File "/home/franck/iramuteq/snap/parts/iramuteq/install/lib/python2.7/site-packages/setuptools/dist.py", line 372, in fetch_build_eggs
replace_conflicting=True,
File "/home/franck/iramuteq/snap/parts/iramuteq/install/lib/python2.7/site-packages/pkg_resources/__init__.py", line 851, in resolve
dist = best[req.key] = env.best_match(req, ws, installer)
File "/home/franck/iramuteq/snap/parts/iramuteq/install/lib/python2.7/site-packages/pkg_resources/__init__.py", line 1123, in best_match
return self.obtain(req, installer)
File "/home/franck/iramuteq/snap/parts/iramuteq/install/lib/python2.7/site-packages/pkg_resources/__init__.py", line 1135, in obtain
return installer(requirement)
File "/home/franck/iramuteq/snap/parts/iramuteq/install/lib/python2.7/site-packages/setuptools/dist.py", line 440, in fetch_build_egg
return cmd.easy_install(req)
File "/home/franck/iramuteq/snap/parts/iramuteq/install/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 674, in easy_install
return self.install_item(spec, dist.location, tmpdir, deps)
File "/home/franck/iramuteq/snap/parts/iramuteq/install/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 700, in install_item
dists = self.install_eggs(spec, download, tmpdir)
File "/home/franck/iramuteq/snap/parts/iramuteq/install/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 881, in install_eggs
return self.build_and_install(setup_script, setup_base)
File "/home/franck/iramuteq/snap/parts/iramuteq/install/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 1120, in build_and_install
self.run_setup(setup_script, setup_base, args)
File "/home/franck/iramuteq/snap/parts/iramuteq/install/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 1108, in run_setup
raise DistutilsError("Setup script exited with %s" % (v.args[0],))
distutils.errors.DistutilsError: Setup script exited with error: This distribution is only supported on MacOSXdistuitls error.
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-9UlL_H-build/
Теперь я застрял с ошибкой distutils ... и я понял, m также не уверен, что R будет (должен?) быть встроен в мою привязку или установлен в моей основной системе.