quantum Posted November 5, 2018 Report Share Posted November 5, 2018 Dear all, for atom-1.3.1 I would like to write an ebuild pysl-0.21.1 As i looked in setup.py, I saw: install_requires=[ 'configparser; python_version<"3.0"', 'future>=0.14.0', 'futures; python_version<"3.2"', 'jedi>=0.12', 'python-jsonrpc-server', 'pluggy' ], extras_require={ 'all': [ 'autopep8', 'mccabe', 'pycodestyle', 'pydocstyle>=2.0.0', 'pyflakes>=1.6.0', 'rope>-0.10.5', 'yapf', ], 'autopep8': ['autopep8'], 'mccabe': ['mccabe'], 'pycodestyle': ['pycodestyle'], 'pydocstyle': ['pydocstyle>=2.0.0'], 'pyflakes': ['pyflakes>=1.6.0'], 'rope': ['rope>0.10.5'], 'yapf': ['yapf'], 'test': ['tox', 'versioneer', 'pytest', 'mock', 'pytest-cov', 'coverage'], }, How could i write something like 'configparser; python_version<"3.0"' in my ebuild? Would it be correct to see all the packages below install_requires as DEPEND and all packages below extras_require as RDEPEND? Regards Link to comment Share on other sites More sharing options...
0 Oleg Vinichenko Posted November 6, 2018 Report Share Posted November 6, 2018 The dep can look like (probably): RDEPEND="$(python_gen_cond_dep 'dev-python/configparse[${PYTHON_USEDEP}]' 'python2*')" Link to comment Share on other sites More sharing options...
0 Oleg Vinichenko Posted November 5, 2018 Report Share Posted November 5, 2018 configparser is a standart module (shipped in python) since version 3.2, if you are using python lesser than 3.2 version, then you need to set a standalone configparser ebuild. You can skip this dep. Link to comment Share on other sites More sharing options...
0 quantum Posted November 5, 2018 Author Report Share Posted November 5, 2018 @Oleg VinichenkoThank you for your replay. if i understand you correctly, then in my case of using python 3.6, then there is no problem. What will happen if someone else with python 2.7 only would like to install this package as well? Then configparser will be needed. What i am missing in your answer is a solution to the case that the someone else and I could use the same ebuild. Is there way to write one ebuild for both cases? Link to comment Share on other sites More sharing options...
0 Oleg Vinichenko Posted November 6, 2018 Report Share Posted November 6, 2018 Yes, you can add dependency for the python2.7 case Link to comment Share on other sites More sharing options...
Question
quantum
Dear all,
for atom-1.3.1 I would like to write an ebuild pysl-0.21.1
As i looked in setup.py, I saw:
install_requires=[ 'configparser; python_version<"3.0"', 'future>=0.14.0', 'futures; python_version<"3.2"', 'jedi>=0.12', 'python-jsonrpc-server', 'pluggy' ], extras_require={ 'all': [ 'autopep8', 'mccabe', 'pycodestyle', 'pydocstyle>=2.0.0', 'pyflakes>=1.6.0', 'rope>-0.10.5', 'yapf', ], 'autopep8': ['autopep8'], 'mccabe': ['mccabe'], 'pycodestyle': ['pycodestyle'], 'pydocstyle': ['pydocstyle>=2.0.0'], 'pyflakes': ['pyflakes>=1.6.0'], 'rope': ['rope>0.10.5'], 'yapf': ['yapf'], 'test': ['tox', 'versioneer', 'pytest', 'mock', 'pytest-cov', 'coverage'], },
How could i write something like
'configparser; python_version<"3.0"'
in my ebuild?
Would it be correct to see all the packages below install_requires as DEPEND and all packages below extras_require as RDEPEND?
Regards
Link to comment
Share on other sites
4 answers to this question
Recommended Posts