diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 0f546e3298e768c3a5d9b5afa2b9dc82235ad07d..ad8cca23e20ed68ef27d22f3f57b9c4808c92bcc 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -13,7 +13,7 @@ test: stage: test image: python:3.6 before_script: - - pip install .[dev] + - pip install .[test] script: - pytest tags: @@ -23,7 +23,7 @@ build-linux: stage: build image: python:3.8 before_script: - - pip install .[dev] + - pip install .[build] - pip install --upgrade setuptools script: - pyinstaller --clean -y cli.spec --distpath . @@ -45,18 +45,14 @@ build-windows: # so we cannot use the regular docker executor stage: build image: docker:stable - tags: - - docker-build - variables: - # CI_DEBUG_TRACE: "true" script: - - docker run --rm -v "$(pwd):/src/" cdrx/pyinstaller-windows:python3 "pip install -r requirements-dev.txt && pyinstaller --clean -y cli.spec --distpath ." + - docker run --rm -v "$(pwd):/src/" cdrx/pyinstaller-windows:python3 "pip install .[build] && pyinstaller --clean -y cli.spec --distpath ." - docker run --rm -v "$(pwd):/src/" cdrx/pyinstaller-windows:python3 "echo 'Testing the generated CLI works…' && (wine ./funkwhale.exe --help | grep uploads) && echo 'funkwhale CLI working \o/'" after_script: - docker run --rm -v "$(pwd):/src/" python:3.8 bash -c "rm -rf /src/build && py3clean /src/" artifacts: - name: "linux_${CI_COMMIT_REF_NAME}" + name: "windows_${CI_COMMIT_REF_NAME}" paths: - funkwhale.exe only: diff --git a/README.md b/README.md index 75050983f90d9f1eeeda346da719222bed854a1d..e21a0fd26b4918555e6111914f73a890f76d9f57 100644 --- a/README.md +++ b/README.md @@ -50,7 +50,7 @@ funkwhale tracks download -d ~/Music -t "{artist}/{album} ({year})/{title}.{exte # Download all tracks matching a search, in ogg format funkwhale tracks ls jekk --ids --limit 0 | xargs funkwhale tracks download -f ogg -d ~/Music -# Download all favorited tracks +# Download all favorite tracks funkwhale tracks ls --filter "favorites=true" --ids --limit 0 | xargs funkwhale tracks download -d ~/Music # Download a track and pipe the output directly to VLC @@ -77,9 +77,9 @@ This cli requires python 3.6 or greater: # Build the binary -You can build the binarie for you platform using the following commands: +You can build the binary for you platform using the following commands: - pip install .[dev] + pip install .[build] pyinstaller cli.spec This will output a binary in `./dist/funkwhale`. diff --git a/cli.spec b/cli.spec index 3655e48337ad5499f1a28ce5ecc0aa485d2e67e1..5badd1feb24cd88cc1dbf6f2fe6b7e83bf4094fe 100644 --- a/cli.spec +++ b/cli.spec @@ -5,7 +5,7 @@ block_cipher = None a = Analysis( ["funkwhale_cli/__main__.py"], - pathex=["/home/eliotberriot/projects/funkwhale/cli"], + pathex=[], binaries=[], datas=[], hiddenimports=[], diff --git a/requirements-dev.txt b/requirements-dev.txt deleted file mode 100644 index 55f0b818a02fc3701857cf0d59e2178647793c34..0000000000000000000000000000000000000000 --- a/requirements-dev.txt +++ /dev/null @@ -1,20 +0,0 @@ -aiofiles -aiohttp -appdirs -click~=7.1.2 -click-log -keyring -marshmallow -python-dotenv -semver -tabulate -tqdm -pathvalidate -aioresponses -asynctest -ipdb -pytest -pytest-mock -pytest-env -pyinstaller -setuptools>49 diff --git a/setup.cfg b/setup.cfg index 193ade451b1f385da34e05c71a01b77bc8373d01..6cb64f211ba014e0aaef6369f6ac10a5adfa95ef 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,9 +1,9 @@ [metadata] name = funkwhale-cli -description = "XXX" +description = "A command line interface to interact with Funkwhale servers" version = 0.1.dev0 -author = Eliot Berriot -author_email = contact@eliotberriot.com +author = The Funkwhale Collective +author_email = contact@funkwhale.audio url = https://dev.funkwhale.audio/funkwhale/cli long_description = file: README.md license = AGPL3 @@ -12,6 +12,7 @@ classifiers = Development Status :: 3 - Alpha License :: OSI Approved :: AGPL Natural Language :: English + Programming Language :: Python :: 3 Programming Language :: Python :: 3.6 [options] @@ -19,18 +20,18 @@ zip_safe = True include_package_data = True packages = find: install_requires = - aiofiles - aiohttp - appdirs + aiofiles~=0.7.0 + aiohttp~=3.7.4 + appdirs~=1.4.4 click~=7.1.2 - click-log - keyring - marshmallow==2.19.2 - python-dotenv - semver - tabulate - tqdm - pathvalidate + click-log~=0.3.2 + keyring~=23.0.1 + marshmallow~=2.19.2 + python-dotenv~=0.18.0 + semver~=2.13.0 + tabulate~=0.8.9 + tqdm~=4.61.1 + pathvalidate~=2.4.1 [options.entry_points] console_scripts = @@ -38,13 +39,18 @@ console_scripts = [options.extras_require] dev = - aioresponses - asynctest - ipdb - pytest - pytest-mock - pytest-env - pyinstaller + ipdb~=0.13.9 + +test = + pytest~=6.2.4 + pytest-mock~=3.6.1 + pytest-env~=0.6.2 + aioresponses~=0.7.2 + asynctest~=0.13.0 + +build = + pyinstaller~=4.3 + [options.packages.find]