Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
cli
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
funkwhale
cli
Commits
6fa0ffc8
Verified
Commit
6fa0ffc8
authored
6 years ago
by
Eliot Berriot
Browse files
Options
Downloads
Patches
Plain Diff
Working setup with pyinstaller
parent
34464f28
No related branches found
No related tags found
1 merge request
!5
Resolve "Provide precompiled binaries for easier install"
Pipeline
#4174
passed
6 years ago
Stage: test
Changes
5
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
.gitignore
+2
-0
2 additions, 0 deletions
.gitignore
README.md
+9
-0
9 additions, 0 deletions
README.md
cli.spec
+35
-0
35 additions, 0 deletions
cli.spec
funkwhale_cli/cli.py
+20
-6
20 additions, 6 deletions
funkwhale_cli/cli.py
setup.cfg
+1
-1
1 addition, 1 deletion
setup.cfg
with
67 additions
and
7 deletions
.gitignore
0 → 100644
+
2
−
0
View file @
6fa0ffc8
dist
build
This diff is collapsed.
Click to expand it.
README.md
+
9
−
0
View file @
6fa0ffc8
...
@@ -11,3 +11,12 @@ This cli requires python 3.6 or greater:
...
@@ -11,3 +11,12 @@ This cli requires python 3.6 or greater:
# Usage
# Usage
``funkwhale --help``
``funkwhale --help``
# Build the binary
You can build the binarie for you platform using the following commands:
pip install .[dev]
pyinstaller cli.spec
This will output a binary in
`./dist/funkwhale`
.
This diff is collapsed.
Click to expand it.
cli.spec
0 → 100644
+
35
−
0
View file @
6fa0ffc8
# -*- mode: python -*-
block_cipher
=
None
a
=
Analysis
(
[
"
funkwhale_cli/cli.py
"
],
pathex
=
[
"
/home/eliotberriot/projects/funkwhale/cli
"
],
binaries
=
[],
datas
=
[],
hiddenimports
=
[],
hookspath
=
[],
runtime_hooks
=
[],
excludes
=
[],
win_no_prefer_redirects
=
False
,
win_private_assemblies
=
False
,
cipher
=
block_cipher
,
noarchive
=
False
,
)
pyz
=
PYZ
(
a
.
pure
,
a
.
zipped_data
,
cipher
=
block_cipher
)
exe
=
EXE
(
pyz
,
a
.
scripts
,
a
.
binaries
,
a
.
zipfiles
,
a
.
datas
,
[],
name
=
"
funkwhale
"
,
debug
=
False
,
bootloader_ignore_signals
=
False
,
strip
=
False
,
upx
=
True
,
runtime_tmpdir
=
None
,
console
=
True
,
)
This diff is collapsed.
Click to expand it.
funkwhale_cli/cli.py
+
20
−
6
View file @
6fa0ffc8
...
@@ -7,6 +7,14 @@ import datetime
...
@@ -7,6 +7,14 @@ import datetime
import
dotenv
import
dotenv
import
functools
import
functools
import
keyring
import
keyring
# importing the backends explicitely is required for PyInstaller to work
import
keyring.backends.kwallet
import
keyring.backends.Windows
import
keyring.backends.OS_X
import
keyring.backends.SecretService
import
keyring.backends.chainer
import
logging
import
logging
import
math
import
math
import
urllib.parse
import
urllib.parse
...
@@ -16,11 +24,12 @@ import pathvalidate
...
@@ -16,11 +24,12 @@ import pathvalidate
import
pathlib
import
pathlib
import
urllib.parse
import
urllib.parse
import
tqdm
import
tqdm
from
.
import
api
from
.
import
config
from
funkwhale_cli
import
api
from
.
import
exceptions
from
funkwhale_cli
import
config
from
.
import
logs
from
funkwhale_cli
import
exceptions
from
.
import
output
from
funkwhale_cli
import
logs
from
funkwhale_cli
import
output
click_log
.
basic_config
(
logs
.
logger
)
click_log
.
basic_config
(
logs
.
logger
)
...
@@ -173,7 +182,12 @@ def set_server(ctx, url, token, use_auth=True):
...
@@ -173,7 +182,12 @@ def set_server(ctx, url, token, use_auth=True):
@TOKEN_DECORATOR
@TOKEN_DECORATOR
@click_log.simple_verbosity_option
(
logs
.
logger
,
expose_value
=
True
)
@click_log.simple_verbosity_option
(
logs
.
logger
,
expose_value
=
True
)
@click.pass_context
@click.pass_context
def
cli
(
ctx
,
env_file
,
url
,
verbosity
,
token
,
quiet
):
def
cli
(
ctx
,
env_file
,
url
,
verbosity
,
token
,
quiet
,
no_login
):
# small hack to fix some weird issues with pyinstaller and keyring
# there seems to be a cache issue somewhere
del
keyring
.
backend
.
get_all_keyring
.
__wrapped__
.
always_returns
keyring
.
core
.
init_backend
()
# /end of hack
ctx
.
ensure_object
(
dict
)
ctx
.
ensure_object
(
dict
)
logs
.
logger
.
disabled
=
quiet
logs
.
logger
.
disabled
=
quiet
set_server
(
ctx
,
url
,
token
,
use_auth
=
not
no_login
)
set_server
(
ctx
,
url
,
token
,
use_auth
=
not
no_login
)
...
...
This diff is collapsed.
Click to expand it.
setup.cfg
+
1
−
1
View file @
6fa0ffc8
...
@@ -44,7 +44,7 @@ dev =
...
@@ -44,7 +44,7 @@ dev =
pytest
pytest
pytest-mock
pytest-mock
pytest-env
pytest-env
pyinstaller
[options.packages.find]
[options.packages.find]
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment