Merge pull request #138 from Dummerle/some_legendary_tests
Fix conflicts with already installed legendary
This commit is contained in:
commit
ba9ac234cd
18
.github/workflows/release.yml
vendored
18
.github/workflows/release.yml
vendored
|
@ -40,7 +40,7 @@ jobs:
|
|||
sudo pip install -r requirements.txt
|
||||
- name: Install legendary
|
||||
run: |
|
||||
pip install ./legendary
|
||||
pip install ./rare/legendary
|
||||
- name: run python setup
|
||||
run: |
|
||||
python3 setup.py sdist
|
||||
|
@ -71,21 +71,13 @@ jobs:
|
|||
sudo wget https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage -O /usr/local/bin/appimagetool
|
||||
sudo chmod +x /usr/local/bin/appimagetool
|
||||
sudo pip3 install appimage-builder
|
||||
- name: Install legendary
|
||||
run: |
|
||||
pip install ./legendary
|
||||
- name: Prepare Build directory
|
||||
run: |
|
||||
mkdir build
|
||||
cp AppImageBuilder.yml build/
|
||||
cd build
|
||||
- name: Build Appimage
|
||||
run: |
|
||||
appimage-builder --skip-test
|
||||
mv Rare-*.AppImage Rare.AppImage
|
||||
mv Rare-*.AppImage.zsync Rare.AppImage.zsync
|
||||
|
||||
- name: Upload to GitHub
|
||||
- name: Upload AppImage to GitHub
|
||||
uses: svenstaro/upload-release-action@2.2.1
|
||||
with:
|
||||
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
@ -93,7 +85,7 @@ jobs:
|
|||
asset_name: Rare-${{ github.event.release.tag_name }}.AppImage
|
||||
tag: ${{ github.ref }}
|
||||
overwrite: true
|
||||
- name: Upload to GitHub
|
||||
- name: Upload zsync file to GitHub
|
||||
uses: svenstaro/upload-release-action@2.2.1
|
||||
with:
|
||||
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
@ -117,7 +109,7 @@ jobs:
|
|||
run: pip3 install --upgrade cx_freeze wheel
|
||||
- name: Install legendary
|
||||
run: |
|
||||
pip install ./legendary
|
||||
pip install ./rare/legendary
|
||||
- name: Build
|
||||
run: python freeze.py bdist_msi
|
||||
|
||||
|
@ -145,7 +137,7 @@ jobs:
|
|||
- name: Pip Dependencies
|
||||
run: |
|
||||
pip install -r requirements.txt
|
||||
pip install ./legendary
|
||||
pip install ./rare/legendary
|
||||
pip install pyinstaller
|
||||
|
||||
- name: copy files
|
||||
|
|
28
.github/workflows/tests.yml
vendored
28
.github/workflows/tests.yml
vendored
|
@ -1,14 +1,4 @@
|
|||
# For most projects, this workflow file will not need changing; you simply need
|
||||
# to commit it to your repository.
|
||||
#
|
||||
# You may wish to alter this file to override the set of languages analyzed,
|
||||
# or to provide custom queries or build logic.
|
||||
#
|
||||
# ******** NOTE ********
|
||||
# We have attempted to detect the languages in your repository. Please check
|
||||
# the `language` matrix defined below to confirm you have the correct set of
|
||||
# supported CodeQL languages.
|
||||
#
|
||||
|
||||
name: "Test"
|
||||
|
||||
on:
|
||||
|
@ -37,9 +27,7 @@ jobs:
|
|||
pip install -r requirements.txt
|
||||
- name: Install legendary
|
||||
run: |
|
||||
pushd legendary
|
||||
python setup.py install
|
||||
popd
|
||||
pip install ./rare/legendary
|
||||
- name: Analysing the code with pylint
|
||||
run: |
|
||||
pylint -E rare --disable=E0611,E1123,E1120 --ignore=ui,singleton.py --extension-pkg-whitelist=PyQt5
|
||||
|
@ -59,14 +47,6 @@ jobs:
|
|||
sudo wget https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage -O /usr/local/bin/appimagetool
|
||||
sudo chmod +x /usr/local/bin/appimagetool
|
||||
sudo pip3 install appimage-builder
|
||||
- name: Install legendary
|
||||
run: |
|
||||
pip install ./legendary
|
||||
- name: Prepare Build directory
|
||||
run: |
|
||||
mkdir build
|
||||
cp AppImageBuilder.yml build/
|
||||
cd build
|
||||
- name: Build Appimage
|
||||
run: |
|
||||
appimage-builder --skip-test
|
||||
|
@ -93,7 +73,7 @@ jobs:
|
|||
run: pip3 install --upgrade cx_freeze wheel
|
||||
- name: Install legendary
|
||||
run: |
|
||||
pip install ./legendary
|
||||
pip install ./rare/legendary
|
||||
- name: Build
|
||||
run: python freeze.py bdist_msi
|
||||
|
||||
|
@ -115,7 +95,7 @@ jobs:
|
|||
- name: Pip Dependencies
|
||||
run: |
|
||||
pip install -r requirements.txt
|
||||
pip install ./legendary
|
||||
pip install ./rare/legendary
|
||||
pip install pyinstaller
|
||||
|
||||
- name: copy files
|
||||
|
|
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -14,3 +14,4 @@ __pycache__
|
|||
/venv310/
|
||||
/venv311/
|
||||
/test.py
|
||||
/.eggs
|
||||
|
|
2
.gitmodules
vendored
2
.gitmodules
vendored
|
@ -1,4 +1,4 @@
|
|||
[submodule "legendary"]
|
||||
path = legendary
|
||||
path = rare/legendary
|
||||
url = https://github.com/dummerle/legendary
|
||||
branch = rare
|
||||
|
|
|
@ -7,13 +7,11 @@ script:
|
|||
# Make usr and icons dirs
|
||||
- mkdir -p AppDir/usr/src
|
||||
- mkdir -p AppDir/usr/share/icons/hicolor/256x256/apps/
|
||||
- git clone https://github.com/Dummerle/Rare --recurse-submodules
|
||||
- cp -r Rare/rare AppDir/usr/src/rare
|
||||
- cp AppDir/usr/src/rare/__main__.py AppDir/usr/src/__main__.py
|
||||
- cp -r rare AppDir/usr/src/rare
|
||||
- cp AppDir/usr/src/rare/resources/images/Rare.png AppDir/usr/share/icons/hicolor/256x256/apps/
|
||||
# Install application dependencies
|
||||
- python3 -m pip install --system --ignore-installed --prefix=/usr --root=AppDir -r Rare/requirements.txt
|
||||
- python3 -m pip install --system --ignore-installed --prefix=/usr --root=AppDir ./Rare/legendary
|
||||
- python3 -m pip install --system --ignore-installed --prefix=/usr --root=AppDir pypresence qtawesome
|
||||
- python3 -m pip install --system --ignore-installed --prefix=/usr --root=AppDir ./rare/legendary
|
||||
|
||||
AppDir:
|
||||
path: AppDir
|
||||
|
@ -21,9 +19,9 @@ AppDir:
|
|||
id: org.dummerle.rare
|
||||
name: Rare
|
||||
icon: Rare
|
||||
version: 1.5.0
|
||||
version: 1.7.0
|
||||
exec: usr/bin/python3
|
||||
exec_args: $APPDIR/usr/src/__main__.py $@
|
||||
exec_args: $APPDIR/usr/src/rare/__main__.py $@
|
||||
apt:
|
||||
arch: amd64
|
||||
allow_unauthenticated: true
|
||||
|
@ -41,9 +39,10 @@ AppDir:
|
|||
- sourceline: deb http://security.ubuntu.com/ubuntu groovy-security multiverse
|
||||
include:
|
||||
- python3
|
||||
- python3-pkg-resources
|
||||
- python3-distutils
|
||||
- python3-pyqt5
|
||||
- python3-psutil
|
||||
- python3-requests
|
||||
|
||||
runtime:
|
||||
env:
|
||||
|
@ -54,11 +53,6 @@ AppDir:
|
|||
# See https://docs.python.org/3/using/cmdline.html#envvar-PYTHONPATH
|
||||
PYTHONPATH: '${APPDIR}/usr/lib/python3.8/site-packages'
|
||||
|
||||
|
||||
files:
|
||||
include: [ ]
|
||||
exclude: [ ]
|
||||
|
||||
test:
|
||||
fedora:
|
||||
image: appimagecrafters/tests-env:fedora-30
|
||||
|
@ -80,6 +74,7 @@ AppDir:
|
|||
image: appimagecrafters/tests-env:ubuntu-xenial
|
||||
command: ./AppRun
|
||||
use_host_x: true
|
||||
|
||||
AppImage:
|
||||
arch: x86_64
|
||||
update-information: gh-releases-zsync|Dummerle|Rare|latest|Rare-*x86_64.AppImage.zsync
|
||||
update-information: gh-releases-zsync|Dummerle|Rare|latest|Rare*.AppImage.zsync
|
||||
|
|
|
@ -5,21 +5,16 @@ import pathlib
|
|||
import sys
|
||||
from argparse import ArgumentParser
|
||||
|
||||
# from PyQt5.QtGui import QOpenGLDebugLogger, QOpenGLDebugMessage
|
||||
|
||||
|
||||
def main():
|
||||
# disable debug.log file
|
||||
# QOpenGLDebugLogger.disableMessages(QOpenGLDebugLogger(), QOpenGLDebugMessage.AnySource, QOpenGLDebugMessage.AnyType)
|
||||
|
||||
# fix cx_freeze
|
||||
import multiprocessing
|
||||
multiprocessing.freeze_support()
|
||||
|
||||
# insert legendary submodule to path
|
||||
sys.path.insert(0, os.path.join(pathlib.Path(__file__).parent.parent.absolute(), "legendary"))
|
||||
|
||||
# insert source directory
|
||||
sys.path.insert(0, str(pathlib.Path(__file__).parent.parent.absolute()))
|
||||
# insert legendary for installed via pip/setup.py submodule to path
|
||||
if not __name__ == "__main__":
|
||||
sys.path.insert(0, os.path.join(os.path.dirname(__file__), "legendary"))
|
||||
|
||||
# CLI Options
|
||||
parser = ArgumentParser()
|
||||
|
@ -81,4 +76,10 @@ def main():
|
|||
|
||||
|
||||
if __name__ == '__main__':
|
||||
# run from source
|
||||
# insert raw legendary submodule
|
||||
sys.path.insert(0, os.path.join(pathlib.Path(__file__).parents[2].absolute(), "legendary"))
|
||||
# insert source directory
|
||||
sys.path.insert(0, str(pathlib.Path(__file__).parent.parent.absolute()))
|
||||
|
||||
main()
|
||||
|
|
6
setup.py
6
setup.py
|
@ -31,8 +31,10 @@ setuptools.setup(
|
|||
long_description_content_type="text/markdown",
|
||||
include_package_data=True,
|
||||
url="https://github.com/Dummerle/Rare",
|
||||
packages=setuptools.find_packages() + setuptools.find_packages(where='legendary'),
|
||||
package_dir={'rare': 'rare', '': 'legendary'},
|
||||
packages=setuptools.find_packages() + [
|
||||
"rare.legendary." + i for i in setuptools.find_packages(where="rare/legendary")
|
||||
],
|
||||
# package_dir={'rare': 'rare'},
|
||||
classifiers=[
|
||||
"Programming Language :: Python :: 3",
|
||||
"Programming Language :: Python :: 3.8",
|
||||
|
|
Loading…
Reference in a new issue