Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
gajim
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
Model registry
Operate
Environments
Monitor
Incidents
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
Sophie Herold
gajim
Commits
af89d7cf
Commit
af89d7cf
authored
7 years ago
by
André
Browse files
Options
Downloads
Patches
Plain Diff
autopep8 setup.py
parent
289c67fd
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
setup.py
+40
-32
40 additions, 32 deletions
setup.py
with
40 additions
and
32 deletions
setup.py
100644 → 100755
+
40
−
32
View file @
af89d7cf
...
...
@@ -72,10 +72,11 @@ def build_trans(build_cmd):
raise
SystemExit
(
msg
)
log
.
info
(
'
Compiling %s >> %s
'
,
po_file
,
mo_file
)
#linux specific piece:
#
linux specific piece:
target
=
'
share/locale/
'
+
lang
+
'
/LC_MESSAGES
'
data_files
.
append
((
target
,
[
mo_file
]))
def
build_man
(
build_cmd
):
'''
Compress Gajim manual files
...
...
@@ -96,16 +97,17 @@ def build_man(build_cmd):
filename
=
False
if
filename
:
#Binary io, so open is OK
#
Binary io, so open is OK
with
open
(
filename
,
'
rb
'
)
as
f_in
,
\
gzip
.
open
(
man_file_gz
,
'
wb
'
)
as
f_out
:
f_out
.
writelines
(
f_in
)
log
.
info
(
'
Compiling %s >> %s
'
,
filename
,
man_file_gz
)
src
=
cwd
+
'
/man
'
+
'
/
'
+
man
+
'
.gz
'
src
=
cwd
+
'
/man
'
+
'
/
'
+
man
+
'
.gz
'
target
=
'
share/man/man1
'
data_files
.
append
((
target
,
[
src
]))
def
build_intl
(
build_cmd
):
'''
Merge translation files into desktop and mime files
...
...
@@ -126,6 +128,7 @@ def build_intl(build_cmd):
merge
(
filenamelocal
+
'
.in
'
,
newfile
,
option
)
data_files
.
append
((
target
,
[
base
+
'
/
'
+
filename
]))
def
substitute_variables
(
filename_in
,
filename_out
,
subst_vars
):
'''
Substitute variables in a file.
...
...
@@ -146,14 +149,14 @@ def merge(in_file, out_file, option, po_dir='po'):
'''
if
os
.
path
.
exists
(
in_file
):
cmd
=
((
'
msgfmt %(opt)s -d %(po_dir)s --template %(in_file)s
'
'
-o %(out_file)s
'
)
%
{
'
opt
'
:
option
,
'
po_dir
'
:
po_dir
,
'
in_file
'
:
in_file
,
'
out_file
'
:
out_file
})
'
-o %(out_file)s
'
)
%
{
'
opt
'
:
option
,
'
po_dir
'
:
po_dir
,
'
in_file
'
:
in_file
,
'
out_file
'
:
out_file
})
if
os
.
system
(
cmd
)
!=
0
:
msg
=
(
'
ERROR: %s was not merged into the translation files!
\n
'
%
out_file
)
out_file
)
raise
SystemExit
(
msg
)
log
.
info
(
'
Compiling %s >> %s
'
,
in_file
,
out_file
)
...
...
@@ -180,12 +183,14 @@ class test(Command):
def
run
(
self
):
os
.
system
(
"
./test/runtests.py
"
)
class
test_nogui
(
test
):
description
=
"
Run tests without GUI
"
def
run
(
self
):
os
.
system
(
"
./test/runtests.py -n
"
)
class
update_po
(
Command
):
description
=
"
Update po files
"
user_options
=
[]
...
...
@@ -229,40 +234,43 @@ package_data = (package_data_activities
# only install subdirectories of data
data_files_app_icon
=
[
(
"
share/icons/hicolor/64x64/apps
"
,
[
"
gajim/data/icons/hicolor/64x64/apps/org.gajim.Gajim.png
"
]),
(
"
share/icons/hicolor/128x128/apps
"
,
[
"
gajim/data/icons/hicolor/128x128/apps/org.gajim.Gajim.png
"
]),
(
"
share/icons/hicolor/scalable/apps
"
,
[
"
gajim/data/icons/hicolor/scalable/apps/org.gajim.Gajim.svg
"
])
]
(
"
share/icons/hicolor/64x64/apps
"
,
[
"
gajim/data/icons/hicolor/64x64/apps/org.gajim.Gajim.png
"
]),
(
"
share/icons/hicolor/128x128/apps
"
,
[
"
gajim/data/icons/hicolor/128x128/apps/org.gajim.Gajim.png
"
]),
(
"
share/icons/hicolor/scalable/apps
"
,
[
"
gajim/data/icons/hicolor/scalable/apps/org.gajim.Gajim.svg
"
])
]
data_files
=
data_files_app_icon
setup
(
name
=
"
gajim
"
,
description
=
'
A GTK+ Jabber client
'
,
version
=
gajim
.
__version__
,
author
=
"
Philipp Hörist, Yann Leboulanger
"
,
author_email
=
"
gajim-devel@gajim.org
"
,
url
=
'
https://gajim.org
'
,
license
=
'
GPL v3
'
,
classifiers
=
[
name
=
"
gajim
"
,
description
=
'
A GTK+ Jabber client
'
,
version
=
gajim
.
__version__
,
author
=
"
Philipp Hörist, Yann Leboulanger
"
,
author_email
=
"
gajim-devel@gajim.org
"
,
url
=
'
https://gajim.org
'
,
license
=
'
GPL v3
'
,
classifiers
=
[
'
Programming Language :: Python :: 3
'
,
],
cmdclass
=
{
cmdclass
=
{
'
build_py
'
:
build
,
'
test
'
:
test
,
'
test_nogui
'
:
test_nogui
,
'
update_po
'
:
update_po
,
},
scripts
=
[
scripts
=
[
'
scripts/gajim
'
,
'
scripts/gajim-history-manager
'
,
'
scripts/gajim-remote
'
],
packages
=
find_packages
(
exclude
=
[
"
gajim.dev
"
,
"
test*
"
]),
package_data
=
{
'
gajim
'
:
package_data
},
data_files
=
data_files
,
install_requires
=
[
'
dbus-python
'
,
'
nbxmpp
'
,
'
pyOpenSSL
'
],
'
scripts/gajim-remote
'
],
packages
=
find_packages
(
exclude
=
[
"
gajim.dev
"
,
"
test*
"
]),
package_data
=
{
'
gajim
'
:
package_data
},
data_files
=
data_files
,
install_requires
=
[
'
dbus-python
'
,
'
nbxmpp
'
,
'
pyOpenSSL
'
],
)
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