PKGBUILD 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181
  1. # Maintainer (arch): Muflone http://www.muflone.com/contacts/english/
  2. # Maintainer (arch): Bruno Pagani <archange@archlinux.org>
  3. # Contributor: Francois Boulogne <fboulogne@april.org>
  4. # Contributor: TDY <tdy@gmx.com>
  5. # Maintainer: Parabola Hackers <dev@lists.parabola.nu>
  6. # parabola changes and rationale
  7. # - removed 'python-pyqt5-webengine' dependency
  8. pkgname=spyder
  9. pkgver=5.4.1
  10. pkgrel=1
  11. pkgrel+=.parabola1
  12. pkgdesc="The Scientific Python Development Environment"
  13. arch=(any)
  14. url="https://www.spyder-ide.org/"
  15. license=(MIT)
  16. makedepends=(python-sphinx python-setuptools-scm python-wheel)
  17. depends=(
  18. python-atomicwrites
  19. python-chardet
  20. python-cloudpickle
  21. python-cookiecutter
  22. python-diff-match-patch
  23. python-intervaltree
  24. ipython
  25. python-jedi
  26. python-jellyfish
  27. python-jsonschema
  28. python-keyring
  29. jupyter-nbconvert
  30. python-numpydoc
  31. python-parso
  32. python-pexpect
  33. python-pickleshare
  34. python-psutil
  35. python-pygments
  36. python-pylint
  37. python-pylint-venv
  38. python-pyqt5
  39. python-pyqt5-webengine
  40. python-lsp-server
  41. python-lsp-black
  42. python-pyls-spyder
  43. python-pyxdg
  44. python-pyzmq
  45. python-qdarkstyle
  46. python-qstylizer
  47. python-qtawesome
  48. python-qtconsole
  49. python-qtpy
  50. python-rtree
  51. python-setuptools
  52. python-sphinx
  53. python-spyder-kernels
  54. python-textdistance
  55. python-three-merge
  56. python-watchdog
  57. autopep8
  58. flake8
  59. python-pycodestyle
  60. python-pydocstyle
  61. python-pyflakes
  62. python-rope
  63. yapf
  64. python-whatthepatch
  65. )
  66. depends=( ${depends[*]/python-pyqt5-webengine/} )
  67. # Starting from autopep8, required optdeps of python-language-server
  68. optdepends=(
  69. 'cython: run Cython files in the IPython Console'
  70. 'python-matplotlib: 2D/3D plotting in the IPython Console'
  71. 'python-numpy: support for N-dimensional arrays in the Variable Explorer'
  72. 'python-pandas: support for DataFrames and Series in the Variable Explorer'
  73. 'python-scipy: support for Matlab workspace in the Variable Explorer'
  74. 'python-sympy: symbolic mathematics in the IPython Console'
  75. )
  76. checkdepends=(
  77. python-pytest
  78. python-pytest-qt
  79. python-pytest-mock
  80. python-pytest-cov
  81. python-pytest-order
  82. python-pytest-lazy-fixture
  83. python-pytest-timeout
  84. python-flaky
  85. python-pandas
  86. python-scipy
  87. python-sympy
  88. python-pillow
  89. python-matplotlib
  90. cython
  91. git
  92. tk
  93. xorg-server-xvfb
  94. )
  95. source=(https://github.com/spyder-ide/${pkgname}/archive/v${pkgver}/${pkgname}-${pkgver}.tar.gz)
  96. source+=(no-webengine.patch)
  97. sha512sums=('f8dc629552957d4ddcbe849388a6b5b53acd17248ea247fd3c27e0a6b93c411102b12f427f9f41824709bceda8687f09efa0310ae4ce798ae9ebc389bbb8253c')
  98. sha512sums+=('acdb96f70df8362159d4997e01eff945bb902fe0391c45dcdbe1425ef1ace4c03405b01a317051a4d9acb0d942c946f958edcf720cd326743bd39ccd526fb69b')
  99. prepare() {
  100. cd ${pkgname}-${pkgver}
  101. # Allow our python libraries versions
  102. sed 's|IPYTHON_REQVER = ">=7.31.1;<9.0.0"|IPYTHON_REQVER = ">=7.31.1"|' -i spyder/dependencies.py
  103. sed "s|JEDI_REQVER = '>=0.17.2;<0.19.0'|JEDI_REQVER = '>=0.17.2'|" -i spyder/dependencies.py
  104. sed "s|PARSO_REQVER = '>=0.7.0;<0.9.0'|PARSO_REQVER = '>=0.7.0'|" -i spyder/dependencies.py
  105. sed "s|PYLSP_REQVER = '>=1.7.0;<1.8.0'|PYLSP_REQVER = '>=1.7.0'|" -i spyder/dependencies.py
  106. sed "s|QDARKSTYLE_REQVER = '>=3.0.2;<3.1.0'|QDARKSTYLE_REQVER = '>=3.0.2'|" -i spyder/dependencies.py
  107. sed "s|QTCONSOLE_REQVER = '>=5.4.0;<5.5.0'|QTCONSOLE_REQVER = '>=5.4.0'|" -i spyder/dependencies.py
  108. sed "s|ipython>=7.31.1,<9.0.0|ipython>=7.31.1|" -i setup.py
  109. sed "s|jedi>=0.17.2,<0.19.0|jedi>=0.17.2|" -i setup.py
  110. sed "s|parso>=0.7.0,<0.9.0|parso>=0.7.0|" -i setup.py
  111. sed "s|python-lsp-server\[all\]>=1.7.0,<1.8.0|python-lsp-server\[all\]>=1.7.0|" -i setup.py
  112. sed "s|qdarkstyle>=3.0.2,<3.1.0|qdarkstyle>=3.0.2|" -i setup.py
  113. sed "s|qtconsole>=5.4.0,<5.5.0|qtconsole>=5.4.0|" -i setup.py
  114. # Required change for ipython
  115. sed "s|extra_extension|extra_extensions|" -i spyder/plugins/ipythonconsole/tests/test_ipythonconsole.py
  116. ## parabola changes ##
  117. # delete CI litter
  118. rm -rf .github/
  119. # remove 'python-pyqt5-webengine' dependency
  120. patch -Np1 < "${srcdir}"/no-webengine.patch
  121. rm -v spyder/plugins/help/plugin.py
  122. rm -v spyder/plugins/help/tests/test_plugin.py
  123. }
  124. build() {
  125. cd ${pkgname}-${pkgver}
  126. python setup.py build
  127. }
  128. check() {
  129. cd ${pkgname}-${pkgver}
  130. # Required per above patching
  131. sed "s|ipython >=7.31.1,<9.0.0|ipython >=7.31.1|" -i binder/environment.yml
  132. sed "s|jedi >=0.17.2,<0.19.0|jedi >=0.17.2|" -i binder/environment.yml
  133. sed "s|parso >=0.7.0,<0.9.0|parso >=0.7.0|" -i binder/environment.yml
  134. sed "s|python-lsp-server >=1.7.0,<1.8.0|python-lsp-server >=1.7.0|" -i binder/environment.yml
  135. sed "s|qdarkstyle >=3.0.2,<3.1.0|qdarkstyle >=3.0.2|" -i binder/environment.yml
  136. sed "s|qtconsole >=5.4.0,<5.5.0|qtconsole >=5.4.0|" -i binder/environment.yml
  137. sed "s|ipython >=7.31.1,<9.0.0|ipython >=7.31.1|" -i requirements/main.yml
  138. sed "s|jedi >=0.17.2,<0.19.0|jedi >=0.17.2|" -i requirements/main.yml
  139. sed "s|parso >=0.7.0,<0.9.0|parso >=0.7.0|" -i requirements/main.yml
  140. sed "s|python-lsp-server >=1.7.0,<1.8.0|python-lsp-server >=1.7.0|" -i requirements/main.yml
  141. sed "s|qdarkstyle >=3.0.2,<3.1.0|qdarkstyle >=3.0.2|" -i requirements/main.yml
  142. sed "s|qtconsole >=5.4.0,<5.5.0|qtconsole >=5.4.0|" -i requirements/main.yml
  143. local disabled_tests=''
  144. # Not working in headless env
  145. disabled_tests+='not test_config_dialog'
  146. disabled_tests+=' and not test_tab_copies_find_to_replace'
  147. disabled_tests+=' and not test_toggle_off_show_all_files'
  148. disabled_tests+=' and not test_select_all_shortcut'
  149. disabled_tests+=' and not test_delete_line_shortcut'
  150. disabled_tests+=' and not test_go_to_line_shortcut'
  151. disabled_tests+=' and not test_transform_to_lowercase_shortcut'
  152. disabled_tests+=' and not test_transform_to_uppercase_shortcut'
  153. disabled_tests+=' and not test_ctrl_c_dbg'
  154. disabled_tests+=' and not test_connection_dialog_remembers_input_with_ssh_passphrase'
  155. disabled_tests+=' and not test_connection_dialog_remembers_input_with_password'
  156. disabled_tests+=' and not test_store_user_credentials'
  157. # Currently some tests failures in completion plugins, but no time to investigate
  158. xvfb-run --auto-servernum python runtests.py --color=yes -k "${disabled_tests}" || echo "Tests failed"
  159. }
  160. package() {
  161. cd ${pkgname}-${pkgver}
  162. python setup.py install --prefix=/usr --root="${pkgdir}" --optimize=1 --skip-build
  163. # Install license file
  164. install -Dm644 LICENSE.txt -t ${pkgdir}/usr/share/licenses/${pkgname}/
  165. # Install icon file
  166. install -Dm644 spyder/images/spyder.svg -t "${pkgdir}"/usr/share/icons/hicolor/scalable/apps/
  167. # Remove useless spyder_win_post_install script
  168. rm -f "${pkgdir}"/usr/bin/spyder_win_post_install.py
  169. }