Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
weboob
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
180
Issues
180
List
Boards
Labels
Milestones
Merge Requests
53
Merge Requests
53
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
weboob
weboob
Commits
6ec2152a
Commit
6ec2152a
authored
Nov 30, 2019
by
Vincent A
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
setup: remove qt apps
parent
e633093d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
129 deletions
+2
-129
setup.py
setup.py
+2
-129
No files found.
setup.py
View file @
6ec2152a
...
...
@@ -22,10 +22,7 @@ from __future__ import print_function
import
glob
import
os
import
subprocess
import
sys
from
distutils.cmd
import
Command
from
distutils.log
import
WARN
from
setuptools
import
find_packages
,
setup
...
...
@@ -33,56 +30,7 @@ from setuptools import find_packages, setup
PY3
=
sys
.
version_info
.
major
>=
3
class
BuildQt
(
Command
):
description
=
'build Qt applications'
user_options
=
[]
def
initialize_options
(
self
):
pass
def
finalize_options
(
self
):
pass
def
run
(
self
):
self
.
announce
(
'Building Qt applications...'
,
WARN
)
make
=
self
.
find_executable
(
'make'
,
(
'gmake'
,
'make'
))
if
not
PY3
:
pyuic5
=
self
.
find_executable
(
'pyuic5'
,
(
'python2-pyuic5'
,
'pyuic5-python2.7'
,
'pyuic5'
))
else
:
pyuic5
=
self
.
find_executable
(
'pyuic5'
,
(
'python3-pyuic5'
,
'pyuic5-python3.7'
,
'pyuic5-python3.6'
,
'pyuic5-python3.5'
,
'pyuic5'
))
if
not
pyuic5
or
not
make
:
print
(
'Install missing component(s) (see above) or disable Qt applications (with --no-qt).'
,
file
=
sys
.
stderr
)
sys
.
exit
(
1
)
subprocess
.
check_call
(
[
make
,
'-f'
,
'build.mk'
,
'-s'
,
'-j2'
,
'all'
,
'PYUIC=
%
s
%
s'
%
(
pyuic5
,
' WIN32=1'
if
sys
.
platform
==
'win32'
else
''
)])
@
staticmethod
def
find_executable
(
name
,
names
):
envname
=
'
%
s_EXECUTABLE'
%
name
.
upper
()
if
os
.
getenv
(
envname
):
return
os
.
getenv
(
envname
)
paths
=
os
.
getenv
(
'PATH'
,
os
.
defpath
)
.
split
(
os
.
pathsep
)
exts
=
os
.
getenv
(
'PATHEXT'
,
os
.
pathsep
)
.
split
(
os
.
pathsep
)
for
name
in
names
:
for
path
in
paths
:
for
ext
in
exts
:
fpath
=
os
.
path
.
join
(
path
,
name
)
+
ext
if
os
.
path
.
exists
(
fpath
)
and
os
.
access
(
fpath
,
os
.
X_OK
):
return
fpath
print
(
'Could not find executable:
%
s'
%
name
,
file
=
sys
.
stderr
)
def
install_weboob
(
qt
,
xdg
):
def
install_weboob
():
packages
=
set
(
find_packages
(
exclude
=
[
'modules'
,
'modules.*'
]))
entry_points
=
{
...
...
@@ -125,59 +73,9 @@ def install_weboob(qt, xdg):
],
}
qt_packages
=
set
((
'weboob.applications.qboobmsg'
,
'weboob.applications.qboobmsg.ui'
,
'weboob.applications.qcineoob'
,
'weboob.applications.qcineoob.ui'
,
'weboob.applications.qcookboob'
,
'weboob.applications.qcookboob.ui'
,
'weboob.applications.qbooblyrics'
,
'weboob.applications.qbooblyrics.ui'
,
'weboob.applications.qhandjoob'
,
'weboob.applications.qhandjoob.ui'
,
'weboob.applications.qhavedate'
,
'weboob.applications.qhavedate.ui'
,
'weboob.applications.qvideoob'
,
'weboob.applications.qvideoob.ui'
,
'weboob.applications.qweboobcfg'
,
'weboob.applications.qweboobcfg.ui'
,
'weboob.applications.qwebcontentedit'
,
'weboob.applications.qwebcontentedit.ui'
'weboob.applications.qflatboob'
,
'weboob.applications.qflatboob.ui'
,
'weboob.applications.qboobtracker'
,
'weboob.applications.qboobtracker.ui'
,
'weboob.applications.qgalleroob'
,
'weboob.applications.qgalleroob.ui'
,
))
if
qt
:
entry_points
[
'gui_scripts'
]
=
[
'qbooblyrics = weboob.applications.qbooblyrics:QBooblyrics.run'
,
'qboobmsg = weboob.applications.qboobmsg:QBoobMsg.run'
,
'qboobtracker = weboob.applications.qboobtracker:QBoobTracker.run'
,
'qcineoob = weboob.applications.qcineoob:QCineoob.run'
,
'qcookboob = weboob.applications.qcookboob:QCookboob.run'
,
'qflatboob = weboob.applications.qflatboob:QFlatBoob.run'
,
'qgalleroob = weboob.applications.qgalleroob:QGalleroob.run'
,
'qhandjoob = weboob.applications.qhandjoob:QHandJoob.run'
,
'qhavedate = weboob.applications.qhavedate:QHaveDate.run'
,
'qvideoob = weboob.applications.qvideoob:QVideoob.run'
,
'qwebcontentedit = weboob.applications.qwebcontentedit:QWebContentEdit.run'
,
'weboob-config-qt = weboob.applications.qweboobcfg:QWeboobCfg.run'
,
]
else
:
packages
=
packages
-
qt_packages
data_files
=
[
(
'share/man/man1'
,
glob
.
glob
(
'man/*'
)),
]
if
xdg
:
data_files
.
extend
([
(
'share/applications'
,
glob
.
glob
(
'desktop/*'
)),
(
'share/icons/hicolor/64x64/apps'
,
glob
.
glob
(
'icons/*'
)),
])
# Do not put PyQt, it does not work properly.
requirements
=
[
...
...
@@ -242,39 +140,14 @@ def install_weboob(qt, xdg):
'xunitparser'
,
'coverage'
,
],
cmdclass
=
{
'build_qt'
:
BuildQt
,
},
)
def
extract_args
(
args
,
options
,
optlist
):
for
option
in
optlist
:
yes
=
'--
%
s'
%
option
no
=
'--no-
%
s'
%
option
if
yes
in
args
and
no
in
args
:
print
(
'
%
s and
%
s options are incompatible'
%
(
yes
,
no
),
file
=
sys
.
stderr
)
sys
.
exit
(
1
)
if
yes
in
args
:
args
.
remove
(
yes
)
options
[
option
]
=
True
elif
no
in
args
:
args
.
remove
(
no
)
options
[
option
]
=
False
if
os
.
getenv
(
'WEBOOB_SETUP'
):
args
=
os
.
getenv
(
'WEBOOB_SETUP'
)
.
split
()
else
:
args
=
sys
.
argv
[
1
:]
options
=
{
'qt'
:
False
,
'xdg'
:
True
}
extract_args
(
args
,
options
,
(
'qt'
,
'xdg'
))
if
options
[
'qt'
]:
args
.
insert
(
0
,
'build_qt'
)
sys
.
argv
=
[
sys
.
argv
[
0
]]
+
args
install_weboob
(
**
options
)
install_weboob
()
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment