diff options
author | Severin Glöckner | 2021-01-03 08:07:30 +0100 |
---|---|---|
committer | Severin Glöckner | 2021-01-03 08:07:30 +0100 |
commit | 069c403e3bb85347741920c95916ffe775f73f6a (patch) | |
tree | 2b471d5471a2c1b9727d701c59ca6fc71dcc6acd | |
parent | 3ca39a95abfd95baf4320cb88ad0fad1290d422c (diff) | |
download | aur-069c403e3bb85347741920c95916ffe775f73f6a.tar.gz |
general update
- compatibility with python 3.9
- use newer external dependencies
- run the tests
- removed the fonts,
can be instlled by the adobe-source-code-pro-fonts package instead
-rw-r--r-- | .SRCINFO | 10 | ||||
-rw-r--r-- | PKGBUILD | 62 | ||||
-rw-r--r-- | setup.py | 28 |
3 files changed, 81 insertions, 19 deletions
@@ -1,19 +1,23 @@ pkgbase = ninja-ide-git pkgdesc = Cross-platform IDE focused on Python application development pkgver = 20190207 - pkgrel = 3 + pkgrel = 4 url = http://ninja-ide.org arch = any license = GPL3 + checkdepends = python-pytest + makedepends = git makedepends = python-setuptools - depends = python depends = python-pyqt5 depends = qt5-declarative + depends = python-pycodestyle + depends = python-pyflakes + options = emptydirs source = git+https://github.com/ninja-ide/ninja-ide.git source = setup.py source = MANIFEST.in md5sums = SKIP - md5sums = 9f9a5b9894d192de503bc98969067f56 + md5sums = c4dbf95e76d6507e3c087cc6cdaf64b0 md5sums = e8fd6b8243172d576d032c26d9140285 pkgname = ninja-ide-git @@ -1,20 +1,22 @@ -# Maintainer Severin Glöckner <severin dot gloeckner at stud dot htwk minus leipzig dot de> +# Maintainer: Severin Glöckner <severin.gloeckner@stud.htwk-leipzig.de> # Contributor: Federico Cinelli <cinelli.federico@gmail.com> pkgname=ninja-ide-git pkgver=20190207 -pkgrel=3 +pkgrel=4 pkgdesc="Cross-platform IDE focused on Python application development" arch=('any') url="http://ninja-ide.org" license=('GPL3') -depends=('python' 'python-pyqt5' 'qt5-declarative') -makedepends=('python-setuptools') +depends=('python-pyqt5' 'qt5-declarative' 'python-pycodestyle' 'python-pyflakes') +makedepends=('git' 'python-setuptools') +checkdepends=('python-pytest') +options=('emptydirs') # for font dir source=("git+https://github.com/ninja-ide/ninja-ide.git" "setup.py" "MANIFEST.in") md5sums=('SKIP' - '9f9a5b9894d192de503bc98969067f56' + 'c4dbf95e76d6507e3c087cc6cdaf64b0' 'e8fd6b8243172d576d032c26d9140285') pkgver() { @@ -28,28 +30,66 @@ prepare() { ln -sf $srcdir/setup.py ln -sf $srcdir/MANIFEST.in - rm -rf ninja_tests ninja_profiling + # fix desktop file + sed "/MimeType/d" -i build_files/$pkgname.desktop + echo "MimeType=text/x-python;" >> build_files/$pkgname.desktop # Work around not being prepared for python 3.8 - sed -e "s/_ast.Num/_ast.Constant/" \ - -e "/_ast.Str/ s/^/#/" \ + # sed -e "s/_ast.Num/_ast.Constant/" \ + # -e "s/_ast.Str/_ast.Constant/" \ + # -i ninja_ide/tools/introspection.py + # Alternative - can we instead of _ast just use ast, + # which still has this code for backwards compatibility (for a while)? + sed -e "/_map_type/,/def _parse_assign/ s/_ast/ast/" \ -i ninja_ide/tools/introspection.py - ln -s grammar37.txt \ - ninja_ide/intellisensei/parso/python/grammar38.txt + + # Updating external dependencies: + + # Use newer pycodestyle (might break things though) + sed -e "s/from ninja_ide.dependencies import pycodestyle/import pycodestyle/" \ + -i ninja_ide/gui/editor/checkers/pep8_checker.py + rm -f ninja_ide/dependencies/pycodestyle.py + + # Notimportchecker is up to date + # https://github.com/eamanu/NotImportChecker + + # Use newer pyflakes (again, might break things, may resolve #2088) + sed -e "s/from ninja_ide.dependencies.pyflakes_mod import checker/from pyflakes import checker/" \ + -i ninja_ide/gui/editor/checkers/errors_checker.py + rm -rf ninja_ide/dependencies/pyflakes_mod/ } build () { cd ninja-ide - python3 setup.py clean --all + python3 setup.py clean python3 setup.py build } +check() { + cd ninja-ide + + ./run-tests.py +} + package() { cd ninja-ide + #find ninja_ide | sed -e '/.cpython.[0-9]*.pyc/d' -e '/__pycache__/d' | sort > /tmp/ninja-ide-repository-files.txt + python3 setup.py install --root="$pkgdir" --skip-build -O1 + # This is intended as a safeguard, to realize, when many things are missing + #cd "$pkgdir/usr/lib/python3.9/site-packages/" + #find ninja_ide | sed -e '/.cpython.[0-9]*.pyc/d' -e '/__pycache__/d' | sort > /tmp/ninja-ide-packaged-files.txt + #cd - + + # Do that here instead of earlier, as the links are converted to text files otherwise + ln -s grammar37.txt "$pkgdir"/usr/lib/python3.9/site-packages/ninja_ide/intellisensei/parso/python/grammar38.txt + ln -s grammar38.txt "$pkgdir"/usr/lib/python3.9/site-packages/ninja_ide/intellisensei/parso/python/grammar39.txt + + # The fonts are now not anymore packaged, but the directory is required + install -dm755 "$pkgdir"/usr/lib/python3.9/site-packages/ninja_ide/fonts install -Dm755 ninja-ide.py "$pkgdir/usr/bin/$pkgname" install -Dm644 ninja_ide/images/icon.png "$pkgdir/usr/share/icons/hicolor/128x128/apps/$pkgname.png" install -Dm644 icon.png "$pkgdir/usr/share/icons/hicolor/256x256/apps/$pkgname.png" @@ -1,17 +1,35 @@ from setuptools import setup, find_packages setup(name='Ninja-IDE', - version='2.3+dev', + version='2.4+dev', description='Cross-platform IDE focused on Python application development', author='The Ninja IDE Developers', url='http://ninja-ide.org', download_url='https://github.com/ninja-ide/ninja-ide', license='GPLv3+', - packages=find_packages(), + package_data={ 'ninja_ide': [ 'intellisensei/jedi/evaluate/compiled/fake/*.pym', + 'intellisensei/parso/python/grammar*.txt', + 'extensions/styles/*', + 'extensions/syntax/*.json', + 'extensions/theme/qss/*', + 'extensions/theme/*', + 'gui/qml/*', + 'gui/qml/img/*', + 'gui/qml/widgets/*', + 'gui/editor/syntaxes/*', + 'images/*', + 'images/help/*', + 'images/stylesheet/*', + 'nresources.qrc' ]}, + packages=find_packages(exclude=['ninja_profiling', 'ninja_tests', 'ninja_tests.*']), python_requires='>=3.4', - install_requires=['pyqt5'], - extra_require={'tests': ['pytest', 'pytest-qt']}, - include_package_data=True, + install_requires=['pyqt5', 'pycodestyle', 'pyflakes'], + extras_require={'tests': ['pytest', 'pytest-qt']}, + #entry_points={'console_scripts':['ninja-ide=ninja_ide.__init__:setup_and_run']}, + #scripts=["ninja-ide.py"], + #include_package_data=False, + #long_description=, + #long_description_content_type=text/plain, zip_safe=False, classifiers=[ 'Development Status :: 3 - Alpha', |