Use pipenv, pbr

Cleaner setup.py
Move src to 'guake'
Dev Dependencies: fiximport, yapf, pylint, autopep8,...
This commit is contained in:
Gaetan Semet 2017-10-16 17:41:59 +02:00
parent ddf727cd3b
commit 089d72aab3
38 changed files with 481 additions and 1084 deletions

23
.editorconfig Normal file
View File

@ -0,0 +1,23 @@
# EditorConfig is awesome: http://EditorConfig.org
# top-most EditorConfig file
root = true
[*]
end_of_line = lf
insert_final_newline = true
indent_style = space
indent_size = 4
tab_width = 4
charset = utf-8
trim_trailing_whitespace = true
[*.rst]
tab_width = 4
[*.yml]
tab_width = 2
[Makefile]
indent_style = tab
indent_size = 4

6
.flake8 Normal file
View File

@ -0,0 +1,6 @@
[flake8]
ignore = E226,E302,E41,E402,F401
max-line-length = 100
exclude = env
max-complexity = 25

9
.gitignore vendored
View File

@ -1,4 +1,4 @@
# Linux, IDE and Editors
# Linux, IDE and Editors
# pycharm
.idea
@ -18,8 +18,6 @@
*.orig
*.pot
*.deb
Makefile
Makefile.in
config.*
configure
.libs
@ -64,3 +62,8 @@ env/
*.bak
src/guake.egg-info/
__pycache__
dist/
*.egg-info/
AUTHORS
ChangeLog

View File

View File

View File

@ -1,34 +1,21 @@
language: python
python:
"2.7"
# - "3.2": python 33 fails in travis due to missing Python.h
- "2.7"
- "3.5"
virtualenv:
system_site_packages: true
compiler:
- gcc
before_install:
- sudo apt-get update -qq
- sudo apt-get install -qq --fix-missing
build-essential
python
autoconf
gnome-common
gtk-doc-tools
libglib2.0-dev
libgtk2.0-dev
libgconf2-dev
python-gtk2
python-gtk2-dev
python-vte
python-appindicator
# python-gconf
# python-keybinder
install:
- pip install --upgrade pip
- pip install --upgrade -r python-requirements.txt
- pip install --system
script:
- ./validate.sh
- ./autogen.sh
- ./configure && make
- make check
- make build

15
.yapf Normal file
View File

@ -0,0 +1,15 @@
[style]
based_on_style = pep8
column_limit = 100
indent_dictionary_value = true
split_before_first_argument= false
split_penalty_after_opening_bracket = 10
; align_closing_bracket_with_visual_indent = true
; blank_line_before_nested_class_or_def = true
; dedent_closing_brackets = false
; spaces_around_power_operator = false
; spaces_before_comment = 2
; split_before_first_argument = false
; split_before_logical_operator = false
; split_arguments_when_comma_terminated = true

View File

@ -1,6 +0,0 @@
Gaetan Semet <gaetan@xeberon.net>, 2014
Max Ulidtko <ulidtko@gmail.com>, 2010-2013
Pierre-Yves Chibon (pingou) <pingou@guake.org>, 2007-2013
Aleksandar Krsteski (SnapShot) <aleksandar@guake.org>, 2010-2013
Lincoln de Sousa <lincoln@guake.org>, 2007-2013
Gabriel Falcão <gabriel@guake-terminal.org>, 2007

676
ChangeLog
View File

@ -1,676 +0,0 @@
(news continues on the NEWS file)
2008-11-25 Gabriel Falcão <gabriel@nacaolivre.org>
* src/guake.py: Applying Licio's (liciofernando@gmail.com) patch for
dual head monitors.
2008-08-09 Gabriel Falcão <gabriel@nacaolivre.org>
* po/pt_BR.po: Fixing a little semantic error.
* src/guake.py: on delete_tab(), pre-adding a new tab when all tabs get
closed, it improves the speed of new guake show request
* src/guake.py: Guake openning new terminals in the same directory than
current openned tab.
2008-08-07 Gabriel Falcão <gabriel@nacaolivre.org>
* TODO: Somethings turn obselete since new features had been implemented.
* configure.ac: Guake version 0.4.0
* src/guake.py: Avoinding gdk device mods mistakes then handling the
resizer.
2008-08-05 Gabriel Falcão <gabriel@nacaolivre.org>
* src/guake.py: Now guake can be resized with a resizer :)
* data/guake.glade: Adding a GtkHPaned as resizer for guake
* data/guake.schemas: Adding two new boolean keys: show_toolbar and show_resizer
* data/guake.glade: toolbar (tabs) is no more affected by window.show_all()
* src/guake.py: Guake are listening to GConf! (only show_resizer and
show_toolbar stuff for now)
* data/guake.schemas: Adding a new boolean key: toolbar_visible_in_fullscreen
* src/guake.py: Guake checking if the tabs must be visible when in
fullscreen mode.
2008-08-04 Lincoln de Sousa <lincoln@minaslivre.org>
* data/about.glade: Adding translators in about dialog.
2008-08-03 Lincoln de Sousa <lincoln@minaslivre.org>
* src/guake.py (Guake.__init__): Getting/showing the accel label
instead of name, the < and > symbols were bothering pango and it's
better to show a pretty label to the user.
2008-08-03 Lincoln de Sousa <lincoln@minaslivre.org>
* src/guake.py (Guake.on_rename_activate): Making it possible to
press enter instead of clicking in ok button to save the tab
renaming.
2008-07-30 Lincoln de Sousa <lincoln@alfaiati.net>
* src/eggcellrendererkeys: Removed.
* configure.ac:
* src/Makefile.am: Removing references of eggcellrendererkeys.
* src/guake.py: Removing all references of eggcellrendererkeys,
gtk provides a bult-in CellRendererAccel, I don't know how I
didn't see it before =/
2008-07-25 Lincoln de Sousa <lincoln@minaslivre.org>
* configure.ac: Bump to version 0.3.1
2008-07-24 Lincoln de Sousa <lincoln@minaslivre.org>
Bug #57 - Problems when listing $PATH directories.
* src/guake.py (PrefsDialog.populate_shell_combo): Last commit
fixed just a part of the whole problem, if the user has something
in the $PATH different of a directory the problem was raising
again.
2008-07-22 Gabriel Falcão <gabriel@nacaolivre.org>
* data/guake.1: Fixing a typo in manpage: from --hide to --help
* debian/: Adding the debian package structure inside guake upstream
2008-07-21 Lincoln de Sousa <lincoln@minaslivre.org>
* src/guake.py (PrefsDialog.populate_shell_combo): Avoiding list
of unexistent directories.
2008-07-17 Lincoln de Sousa <lincoln@minaslivre.org>
* po/POTFILES.in: Adding eggcellrendererkeys.c
2008-07-17 Lincoln de Sousa <lincoln@minaslivre.org>
Bug #48 - /usr/bin/guake is selectable as "default interpreter"
* src/guake.py (PrefsDialog.populate_shell_combo): Now it lists
all found python interpreters in path.
* NEWS: Just telling to the world about this new feature =)
2008-07-10 Lincoln de Sousa <lincoln@minaslivre.org>
* src/guake.py (Guake.on_window_lostfocus): Testing if the main
window is already hidden before hide it (Closes #6).
* configure.ac: Adding es, pl and ru_RU to ALL_LINGUAS.
2008-07-08 Lincoln de Sousa <lincoln@minaslivre.org>
Bug #31 - Double click behavior
* src/guake.py (Guake.add_tab): Setting word_chars of each new
terminal.
* data/guake.schemas: Adding word_chars property in guake schemas.
2008-06-26 Gabriel Falcão <gabriel@nacaolivre.org>
* data/guake.1: Added.
* data/Makefile.am: Adding man file.
2008-06-22 Lincoln de Sousa <lincoln@minaslivre.org>
* src/guake.py (Guake): Added load_accel_map method to make Quit
context menu works (Closes #33).
* src/guake.py: Fixing problems in "Stay on top" toggle, Patch by
infinito (Closes #25).
2008-06-20 Lincoln de Sousa <lincoln@minaslivre.org>
* NEWS: Updated.
* README: Adding pygtk in dependency list.
* src/eggcellrendererkeys/Makefile.am: Adding
eggcellrendererkeys-arg-types.py to EXTRA_DIST.
2008-06-19 Lincoln de Sousa <lincoln@minaslivre.org>
* data/prefs.glade: Fixing some Adding compatibility keybindings
to backspace and delete keys and fixing some spaces.
* src/guake.py: Fixing some gettext calls, patch by
infinito. Closes #27.
* src/guake.py: (Guake.show_context_menu): Making double/triple
click to select words as in gnome-terminal. Closes #31.
2008-06-19 Lincoln de Sousa <lincoln@minaslivre.org>
* data/prefs.glade: Added compatibility tab (stolen from
gnome-terminal =)
* data/guake.schemas: Added two new keys (compat_backspace,
compat_delete).
* src/guake.py (Guake, PrefsDialog): Setting delete and backspace
compatibility bindings as in gnome-terminal. Thanks so much
gnome-terminal guys)
2008-06-18 Lincoln de Sousa <lincoln@minaslivre.org>
* data/guake.schemas: Adding the close_tab schema entry.
* src/guake.py (PrefsDialog.on_key_cleared): Unbinding accel when
cleared.
* src/guake.py (Guake.load_accelerators): Adding close_tab
binding (Closes: #4).
2008-06-16 Lincoln de Sousa <lincoln@minaslivre.org>
* src/guake.py (KeyEntry): Adding __repr__ and __eq__ methods to
make it easy and pythonic to compare with other keyentry and to
debug.
* src/guake.py (PrefsDialog.on_key_edited): Adding validation to
avoid repeated keybindings and to avoid using simple keys
as [a-zA-Z0-9] keys.
* src/guake.py (PrefsDialog): Adding a way to clear a keybinding
with on_key_cleared method.
2008-06-15 Lincoln de Sousa <lincoln@minaslivre.org>
* configure.ac: Bump to version 0.3.
* Makefile.am: Removing some intl files reference (it was breaking
make dist rule)
* m4/intltool.m4: Updates from intltool.
* src/guake.py (PrefsDialog): Changed the old way of showing
keybindings to the way that uses eggcellrendererkeys.
* src/guake.py (KeyEntry): Added to support above change.
* src/eggcellrendererkeys/cellrendererkeys.override: Overriding
egg_accelerator_parse_virtual function to make it pythonic.
* src/eggcellrendererkeys/cellrendererkeys.defs: Renaming
virtual_accelerator_label to accelerator_label and
virtual_accelerator_name to accelerator_name. Adding
accelerator_parse_virtual definition.
2008-06-15 Lincoln de Sousa <lincoln@minaslivre.org>
* src/eggcellrendererkeys/*: Adding bindings to
EggCellRendererKeys, a renderer that shows key shortcuts.
* configure.ac:
* src/Makefile.am: Adding dependencies and subdirectories to
compile eggcellrendererkeys.
2008-06-11 Lincoln de Sousa <lincoln@minaslivre.org>
* data/guake.glade: Adding the tab-menu widget.
* src/guake.py: Code cleanup and comments added.
* src/guake.py (Guake): Adding a context menu to each tab with
rename and close options.
2008-06-11 Lincoln de Sousa <lincoln@minaslivre.org>
* src/guake.py (Guake): Finishing initial tab issues, like close,
now the child process is being killed with SIGKILL. Terminal focus
on tab click was fixed too. last_pos attribute and its setter were
removed.
* data/guake.glade: adding close tab menu entry and fixing little
focus issues on main notebook.
2008-06-10 Lincoln de Sousa <lincoln@minaslivre.org>
* src/guake.py: Starting to implement the new tabs
system (acctualy almost finishing =) and updating image names.
* src/statusicon.py: Updating notification image name.
2008-06-10 Lincoln de Sousa <lincoln@minaslivre.org>
* data/guake.glade: Hiding tabs and border from the main notebook,
fixing add tab button image, removing the "guake" name in left
side and adding an hbox to be the place holder to the new tab
system.
* data/pixmaps/add_tab.svg:
* data/pixmaps/close.svg:
* data/pixmaps/statusicon_*: Removed.
* data/pixmaps/guake.svg: Adding some lights and reducing some
borders.
* data/pixmaps/guake.png: Generated from the new guake.svg;
* data/pixmaps/guake-notification.png:
* data/pixmaps/guake-tray.png: Added.
* data/pixmaps/Makefile.am: Updating changed files in
pixmaps_DATA.
2008-06-04 Lincoln de Sousa <lincoln@minaslivre.org>
* data/prefs.glade: Adding a better tittle and setting some
paddings and spaces.
* data/tab{down, up}.svg: Making these images a bit smaller.
* data/guake.glade: removing Modal flag from the main window (it
was bothering preferences and about dialogs'
2008-06-03 Lincoln de Sousa <lincoln@minaslivre.org>
* data/Makefile.am: Clean up.
* src/guake.py (Guake.show): Moving window after shown.
* src/guake.py (Guake.show_prefs, Guake.show_about)
(PrefsDialog.show): Making dialogs be shown and hidden without
bothering main window.
* data/guake.glade: Removing version number from main window and
removing window position from center.
* data/prefs.glade: This dialog is no longer set as modal and
crazy glade changes.
2008-06-03 Gabriel Falcão <gabriel@nacaolivre.org>
* configure.ac: ALL_LINGUAS configured by adding japanese
translation. Version changed to 0.2
2008-05-28 Gabriel Falcão <gabriel@nacaolivre.org>
* src/guake.py: Applied patch from SteveD <dashdot@f-m.fm> that fixes the
bug of scrollbars, ticket #1.
* src/guake.py: Applied a modificated version of SteveD's patch for
"infinite VTEs" bug, reported in ticket #3,
2007-11-26 Lincoln de Sousa <lincoln@minaslivre.org>
* data/pixmaps/Makefile.am: Fixing little problem in line 6, I forgot to
put a slash and it was removing some images from the distribution pack.
2007-11-17 Lincoln de Sousa <lincoln@minaslivre.org>
* Makefile.am: Adding EXTRA_DIST and DISTCLEANFILES to make intltool
works in make distcheck.
* configure.ac: Fixing version number.
* po/POTFILES.in: Adding some python files that should be
internationalized.
2007-10-24 Lincoln de Sousa <lincoln@minaslivre.org>
* data/prefs.glade: Gnome Hig compilance by n3rd3x, thank you guy =)
2007-10-10 Lincoln de Sousa <lincoln@minaslivre.org>
* data/guake.glade: Removing tabs from notebool-terminals widget, they are
unuseful and generates a warning when starts guake.
* data/guake.schemas: Adding a new entry to store `toggle fullscreen`
accell key.
* src/guake.py: Adding a new entry in LHOTKEYS tuple.
* src/guake.py (Guake): Adding a new boolean attribute to store fullscreen
state and adding the function that toggles this state called
accel_toggle_fullscreen and its association in load_accelerators.
2007-10-10 Gabriel Falcão <root@gabrielfalcao.com>
* data/pixmaps/close.svg: A little bit bigger close image for tabs.
* data/guake.glade: A context-menu was created with gtk.menu widget.
* data/guake.schemas: New schema entries for keyboard shortcuts in
copy/paste
* src/guake.py: Adding a context menu for the 3rd mouse button press event.
* src/guake.py: Key bind accellerators added for copy/paste from guake.
* src/guake.py: In preferences window, added the entries to edit clipboard
shortcut keys.
2007-10-07 Lincoln de Sousa <lincoln@minaslivre.org>
* data/prefs.glade: Fixing callback name in shell combo signal connection.
* src/guake.py: Testing if a shell exists before put it in the combo.
2007-10-06 Gabriel Falcão <root@gabrielfalcao.com>
* data/pixmaps/tabdown.svg: Tangonified
* data/pixmaps/tabup.svg: Tangonified
2007-10-06 Lincoln de Sousa <lincoln@minaslivre.org>
* configure.ac: Fixing bug tracker url and changing version to 0.1a.
* data/pixmaps/down_in.svg:
* data/pixmaps/down_normal.svg:
* data/pixmaps/guakelogo.svg:
* data/pixmaps/left_in.svg:
* data/pixmaps/left_normal.svg:
* data/pixmaps/littleguakelogo.png:
* data/pixmaps/littleguakelogo.svg:
* data/pixmaps/new_guakelogo.png:
* data/pixmaps/right_in.svg:
* data/pixmaps/right_normal.svg:
* data/pixmaps/up_in.svg:
* data/pixmaps/up_normal.svg: Removed.
* data/pixmaps/Makefile.am: Fixing names of images that were [re]moved.
* data/pixmaps/guake.svg: Considered as the original image used to make
all other guake logos, came from down_normal.svg old image.
* src/guake.py (Guake.__init__): Fixing main image name (below tabs), to
point to statusicon_out.png.
* src/guake.py (AboutDialog.__init__):
* data/about.glade: Fixing emails, adding gabriel in artists list,
improving guake description, adding version information and setting
application name in about window.
* src/guake.py (PrefsDialog.__init__): Fixing jpg, jpeg file filters to be
passed to gtk.FileChooser.
* src/guake.py (PrefsDialog.on_key_edited): Fixing rebinding of global
hotkeys.
* src/guake.py (Guake, PrefsDialog): removing Guake.use_bgimage as
attribute, gconf is a really good framework to store/manage configuration.
* src/guake.py (Guake.show): Setting the main window to be shown in all
desktos with the .stick() method.
* src/guake.py (Guake): Added toggle_scrollbars method and fixing problems
when hidding/showing scrollbars and added a notification when guake starts.
* src/guake.in: Adding the -a flag to change the process name and make it
easy to find guake by using ps or another process management tool.
* src/common.py (ShowableError): avoiding sys.exit when exit_code == -1.
* src/common.py (pixmapfile, gladefile): Now these functions returns the
absolute path of files.
2007-10-02 Lincoln de Sousa <lincoln@minaslivre.org>
* src/guake.py (PrefsDialog):
* src/guake.py (PrefsDialog.load_configs): Widget spinHistorySize renamed
to historysize-spinbutton to follow the name of other widgets, because of
this, the callback on_spinHistorySize_value_changed was renamed to
on_historysize_spinbutton_value_changed. Removed animate flag button
changer.
* src/guake.py (PrefsDialog.load_configs): Adding warnings when unable to
parse a color.
* src/guake.py (PrefsDialog.on_show_scrollbar_checkbutton_toggled): Pep8'ed
* src/guake.py
(PrefsDialog.on_bgimage_filechooserbutton_selection_changed): little var
name clean.
* src/guake.py (Guake.refresh): Comment updated, misspell fixed.
* src/guake.py (Guake.show): Moving add_tab call to be called before
self.window.show, to avoid blank screens before adding a tab. And some
unuseful function calls removed. Not this method resizes and shows the main
window, see the next entry to understand why.
* src/guake.py (Guake.animate_hide, Guake.animate_show): Removed, we will
wait a better moment to implement animated things, now Guake.show and
Guake.hide makes the work alone.
* data/guake.glade: window-root is not a popup any more, now it's a
toplevel window, his type_hint is Normal by default, etc. The
notebook-terminals widget had his tabs hidden by default, now it can has
focus, all borders were set to 0, empty pages were removed, because it is
added by code, not in the glade file. toolbar widget height was set to 22.
* data/prefs.glade: spinHistorySize widget was renamed to
historysize-spinbutton (his change signall too), padding and spacing
changed in many places, misspell fixed in "Hide on lose focus" and remove
option to choose animated show/hide.
2007-06-21 Lincoln de Sousa <lincoln@archlinux-br.org>
* src/dialogs.py: Removed.
* src/Makefile.am: Removing dialog.py from extra dist list.
2007-06-20 Gabriel Falcao <gabrielteratos@gmail.com>
* src/guake.py: Added a filter to choose only image files in prefs dialog
* src/guake.py: Added an error handling for bg_filechooser in prefs dialog
2007-06-19 Lincoln de Sousa <lincoln@archlinux-br.org>
* src/common.py: Adding ShowableError class and test_gconf function.
* src/guake.py (Guake.add_tab): Improving logic that hiddes scrollbar.
* src/guake.py (Guake.show): Removing some unusefull code.
* src/guake.py: Adding a call to test_gconf in main section of module.
2007-06-17 Gabriel Falcao <gabrielteratos@gmail.com>
* data/guake.schema: Adding two more keys: scrollbar visibe (bool) and
history size(int)
* data/prefs.glade: Adding widget to setup scrollback lines (aka. history
size)
* data/prefs.glade: Adding widget to setup scrollbar visibility
* src/guake.py: Added respective methods to handle history size and
scrollbar visibility
2007-06-17 Lincoln de Sousa <lincoln@archlinux-br.org>
* src/globalhotkeys/keybinder.c: Removing a little test...
* src/globalhotkeys/globalhotkeys.c: Adding two lines to make the code
pretty =D
* src/globalhotkeys/testbinding.c: Adding license information (Never forget
this again!!!)
* src/common.py: Removing translation functions (using bindtextdomain
function in simpleglade.py)
* src/guake.py: Calling bindtextdomain function to setup translation,
changing guakeabt.png image name to guake.png, little code cleanup,
* src/guake.py (Guake): Some methods was moved to be nearer to methods that
does closed things (load_config and load_accelerators specifically). Added
accel_* methods to avoid Control caracters in terminal widget (these
methods are connected to a key action, and they returns True -- this is the
trick)
* src/guake.py (Guake.update_preview_cb): Changing number of params (self
was not there =/) and removing unecessary try/except and using a simple if.
The image size was changed too.
* src/guake.py (Guake.add_tab): Added a scrollbar in every new tab added.
* src/guake.py (guake.set_last_pos,add_tab): Improved the way to get the
current tab shown.
* src/guake.py (Guake.on_terminal_exited): Adding a new parameter (term) to
this callback. It was necessary because when a terminal exits the widget
sent is not a terminal, after the change above, it must be sent as
user_data to this callback.
* src/simplegladeapp.py: Commenting setlocale call to avoid problems with
languages with sufixes (as pt_BR.utf8)
* po-extact: Fixing a bug that was removing all .h files in project =/ no
it only removes *.glade.h files...
* data/pixmaps,
* data/pixmaps/Makefile.am: Added.
* data/*.png,
* data/*.svg: Moved to data/pixmaps
* configure.ac: Adding data/pixmaps/Makefile in output list.
* TODO: Updated.
2007-06-14 Lincoln de Sousa <lincoln@archlinux-br.org>
* src/globalhotkeys/example.py: Added
* src/globalhotkeys/keybinder.c,
* src/globalhotkeys/keybinder.h: Changing return type of keybinder_bind
from void to gboolean.
* src/globalhotkeys/globalhotkeys.c: Making _wrapped_keybinder_bind returns
bool python values depending on binding works properly.
2007-06-13 Lincoln de Sousa <lincoln@archlinux-br.org>
* src/common.py: Adding update_ui function (moved from utils.py)
* src/guake.py: Changing window_size from string to int, renaming
add_tab.svg to add_tab.png, adding keyboard bindings to add a new tab and
walk through tabs.
* src/guake.py (Guake): Renaming setTerminalFocus to set_terminal_focus,
animateHide to animate_hide, animateShow to animate_show, delete_page to
delete_tab. Adding load_accelerators.
Removing setOnTop, setAnimationProportions, getScreenSize.
* src/guake.py (Guake.refresh): Removed PrefsDialog instantiation, that was
unecessary.
* src/guake.py (Guake.load_configs): Removing too many unecessary code,
removing references from removed utils module.
* src/main.py,
* src/utils.py: Removed.
* src/Makefile.am: Removing references of main.py, utils.py and
guakeApplets.py.
* data/guake.glade: Adding more configuration of main window to glade file
and removing that from python code.
* data/Makefile.am: Removing references from add_tab.svg and addTerm.svg
and adding reference to add_tab.png.
* data/add_tab.svg: Resising the image.
* data/guake.schemas: Changing window_size type from string to int and
adding more keys (keybindings/local/new_tab,
keybindings/local/previous_tab, keybindings/local/next_tab)
* data/add_tab.png: Added
2007-06-03 Lincoln de Sousa <lincoln@archlinux-br.org>
* src/guakeApplet.py: Removed.
* TODO: Added more issues, this will be our standard roadmap before
using a tracker =)
2007-06-01 Lincoln de Sousa <lincoln@archlinux-br.org>
* src/guake.py: Code cleanup, renaming some methods, to remove the
mixedCase style and use the underscore_separated style.
2007-05-30 Lincoln de Sousa <lincoln@archlinux-br.org>
* src/guake.in: Became a shell script, to avoid problems with dbus.
* src/guake.py: Code cleanup and adding methods that will be called by
dbus. Renamed method addTerm to add_tab. Changed dbus object name.
* src/dbusiface.py: Changed name of object from DBus to DBusInterface, and
changed the way to inform user that dbus will not be available.
* data/add_tab.svg: Added -- This is a copy of addTerm.svg and was copied
only because addTerm method has its name changed in guake.py file,
addTerm.svg still in data dir and will only be removed when we do the
cleanup in image file names.
* data/Makefile.am: Added add_tab.svg file in data dir.
2007-05-30 Lincoln de Sousa <lincoln@archlinux-br.org>
* autogen.sh: Sending all parameters from this to gnome-autogen.sh.
* configure.ac: Adding more two expanded variables (BINDIR and DATADIR) and
adding more two output files.
* TODO: Updating with closed things.
* src/guake_globals.py.in: Changing paths to be more customizable by the
configure script.
* data/Makefile.am: Adding desktop file, dbus service file and schema file.
* data/guake.desktop.in,
* data/org.gnome.Guake.service.in: Added
2007-05-27 Lincoln de Sousa <lincoln@archlinux-br.org>
* data/guake.glade,
* data/prefs.glade,
* data/about.glade: Removing image path references, because libglade does
not have a parameter to set `pixmap dir', so we make it in python.
* src/guake: Renamed to src/guake.in
* src/guake.in: Added to be the main script instead of guake.py, it only calls
guake.run function.
* m4/*: Added.
* configure.ac: Adding m4 as macro dir, adding a call to AS_AC_EXPAND set
LIBDIR with libdir value and adding `src/guake' as an output file.
* src/Makefile.am: Changing guake dir from prefix/bin to bindir. It was
made to able the user to change bin dir with the `configure' script.
* src/common.py,
* src/guake.py: datapath function was splitted in pixmapfile and gladefile
functions because if this project doesn't stop to grow, we will separate
images from glade files in data dir.
* src/guake.py: Adding image references told above and some code cleanup.
2007-05-26 Lincoln de Sousa <lincoln@archlinux-br.org>
* AUTHORS,
* INSTALL,
* NEWS,
* autogen.sh,
* Makefile.am,
* configure.ac,
* data/Makefile.am,
* src/Makefile.am,
* src/globalhotkeys/Makefile.am,
* src/guake_globals.py.in,
* src/guake: Added
* setup.py: Removed

86
Makefile Normal file
View File

@ -0,0 +1,86 @@
.PHONY: build
MODULE:=guake
all: dev style checks build dists test-unit
dev:
@pipenv install --dev
install-local:
@pipenv install
install-system:
@pipenv install --system
style: isort autopep8 yapf
isort:
@pipenv run isort -y
autopep8:
@pipenv run autopep8 --in-place --recursive setup.py $(MODULE)
yapf:
@pipenv run yapf --style .yapf --recursive -i $(MODULE)
checks: sdist flake8 pylint
flake8:
@pipenv run python setup.py flake8
pylint:
@pipenv run pylint --rcfile=.pylintrc --output-format=colorized $(MODULE)
build: readme dists
run-local:
@echo "Starting Dopplerr on http://localhost:$(TEST_PORT) ..."
@pipenv run $(MODULE)
shell:
@pipenv shell
test-unit:
@pipenv run pytest $(MODULE)
test-coverage:
pipenv run py.test -v --cov $(MODULE) --cov-report term-missing
dists: sdist bdist wheels
sdist:
@pipenv run python setup.py sdist
bdist:
@pipenv run python setup.py bdist
wheels:
@pipenv run python setup.py bdist_wheel
pypi-publish: build
@pipenv run python setup.py upload -r pypi
update:
@pipenv update
freeze:
@pipenv run pip freeze
githook:style readme
push: githook
@git push origin --tags
# aliases to gracefully handle typos on poor dev's terminal
check: checks
devel: dev
develop: dev
dist: dists
install: install-system
pypi: pypi-publish
run: run-local
styles: style
test: test-unit
upgrade: update
wheel: wheels

View File

@ -1,6 +0,0 @@
SUBDIRS = src/guake data po
EXTRA_DIST = \
AUTHORS \
NEWS \
README.rst

28
Pipfile Normal file
View File

@ -0,0 +1,28 @@
[[source]]
url = "https://pypi.python.org/simple"
verify_ssl = true
name = "pypi"
[dev-packages]
fiximports = "*"
"flake8" = "*"
"autopep8" = "*"
pylint = "*"
yapf = "*"
[packages]
astroid = "==1.3.8"
"autopep8" = "==1.2.2"
click = "==6.6"
first = "==2.0.1"
"logilab-common" = "==1.2.1"
"pep8" = "==1.7.0"
"pip-tools" = "==1.6.5"
pyflakes = "==1.1.0"
pylint = "==1.4.3"
mock = "==2.0.0"
pytest = "==3.0.1"
pbr = "*"

245
Pipfile.lock generated Normal file
View File

@ -0,0 +1,245 @@
{
"_meta": {
"hash": {
"sha256": "b00f70daf0af1f7fc28f583f83955e0f003a12500cca2c8e2dbe86e412a7565b"
},
"host-environment-markers": {
"implementation_name": "cpython",
"implementation_version": "3.5.2",
"os_name": "posix",
"platform_machine": "x86_64",
"platform_python_implementation": "CPython",
"platform_release": "4.4.0-96-generic",
"platform_system": "Linux",
"platform_version": "#119-Ubuntu SMP Tue Sep 12 14:59:54 UTC 2017",
"python_full_version": "3.5.2",
"python_version": "3.5",
"sys_platform": "linux"
},
"pipfile-spec": 6,
"requires": {},
"sources": [
{
"name": "pypi",
"url": "https://pypi.python.org/simple",
"verify_ssl": true
}
]
},
"default": {
"astroid": {
"hashes": [
"sha256:2a24cb2da31ab12c704730c49864a2017603d2601ff253eae75db8aca5598473",
"sha256:3971c35c675dc7acfceb636eb1758b7df9fc3ad75b5f81ca89f57ccf51719442"
],
"version": "==1.3.8"
},
"autopep8": {
"hashes": [
"sha256:ecc51614755c7f697e83478f87eb6bbd009075a397c15080f0311aaecbbdfca8"
],
"version": "==1.2.2"
},
"click": {
"hashes": [
"sha256:fcf697e1fd4b567d817c69dab10a4035937fe6af175c05fd6806b69f74cbc6c4",
"sha256:cc6a19da8ebff6e7074f731447ef7e112bd23adf3de5c597cf9989f2fd8defe9"
],
"version": "==6.6"
},
"first": {
"hashes": [
"sha256:41d5b64e70507d0c3ca742d68010a76060eea8a3d863e9b5130ab11a4a91aa0e",
"sha256:3bb3de3582cb27071cfb514f00ed784dc444b7f96dc21e140de65fe00585c95e"
],
"version": "==2.0.1"
},
"logilab-common": {
"hashes": [
"sha256:af735b5fdc304f7ee2fe44a6f096604e13c0b0d98b97dde96d4107a88480fd87"
],
"version": "==1.2.1"
},
"mock": {
"hashes": [
"sha256:5ce3c71c5545b472da17b72268978914d0252980348636840bd34a00b5cc96c1",
"sha256:b158b6df76edd239b8208d481dc46b6afd45a846b7812ff0ce58971cf5bc8bba"
],
"version": "==2.0.0"
},
"pbr": {
"hashes": [
"sha256:60c25b7dfd054ef9bb0ae327af949dd4676aa09ac3a9471cdc871d8a9213f9ac",
"sha256:05f61c71aaefc02d8e37c0a3eeb9815ff526ea28b3b76324769e6158d7f95be1"
],
"version": "==3.1.1"
},
"pep8": {
"hashes": [
"sha256:4fc2e478addcf17016657dff30b2d8d611e8341fac19ccf2768802f6635d7b8a",
"sha256:a113d5f5ad7a7abacef9df5ec3f2af23a20a28005921577b15dd584d099d5900"
],
"version": "==1.7.0"
},
"pip-tools": {
"hashes": [
"sha256:b858376db2ab2faf5ed2fe8818e374a042db4a222253318c04f70f137a3e2f22",
"sha256:6cae01789c401538aed5e2e349ec1b4211349299181479de96ff3b1941a89840"
],
"version": "==1.6.5"
},
"py": {
"hashes": [
"sha256:2ccb79b01769d99115aa600d7eed99f524bf752bba8f041dc1c184853514655a",
"sha256:0f2d585d22050e90c7d293b6451c83db097df77871974d90efd5a30dc12fcde3"
],
"version": "==1.4.34"
},
"pyflakes": {
"hashes": [
"sha256:c2ec174a7cff6486176b1f53e7d15d34380c3688410f88d86b323608cc0906fb",
"sha256:e5f959931987e2be178781554b485d52342ec9f1b43f891d2dad07a691c7a89a"
],
"version": "==1.1.0"
},
"pylint": {
"hashes": [
"sha256:3dc912f7563348eec1c5d89f4c2f293674a55086a4e4b65bea29ffe91301323d",
"sha256:1dce8c143a5aa15e0638887c2b395e2e823223c63ebaf8d5f432a99e44b29f60"
],
"version": "==1.4.3"
},
"pytest": {
"hashes": [
"sha256:ba6ae459222c3ee650d9e7a3f8cbf69c23c20ed6977496e9081f3b8da19107d0",
"sha256:e82bc0596ee96b2287c08705cfcb6898db1fe4b5c87db3b6823f1fdd77fb3ff1"
],
"version": "==3.0.1"
},
"six": {
"hashes": [
"sha256:832dc0e10feb1aa2c68dcc57dbb658f1c7e65b9b61af69048abc87a2db00a0eb",
"sha256:70e8a77beed4562e7f14fe23a786b54f6296e34344c23bc42f07b15018ff98e9"
],
"version": "==1.11.0"
}
},
"develop": {
"astroid": {
"hashes": [
"sha256:39a21dd2b5d81a6731dc0ac2884fa419532dffd465cdd43ea6c168d36b76efb3",
"sha256:492c2a2044adbf6a84a671b7522e9295ad2f6a7c781b899014308db25312dd35"
],
"version": "==1.5.3"
},
"autopep8": {
"hashes": [
"sha256:ff787bffb812818c3071784b5ce9a35f8c481a0de7ea0ce4f8b68b8788a12f30"
],
"version": "==1.3.3"
},
"fiximports": {
"hashes": [
"sha256:069b3701bae64a59a40dcccf1fec0ddbfc4a941f1b92ffc207462985fecf7a13",
"sha256:bfd97467b6d97d9c837be45db733d00ef964e4b0577111ebd0be44bb46061709"
],
"version": "==0.1.16"
},
"flake8": {
"hashes": [
"sha256:f1a9d8886a9cbefb52485f4f4c770832c7fb569c084a9a314fb1eaa37c0c2c86",
"sha256:c20044779ff848f67f89c56a0e4624c04298cd476e25253ac0c36f910a1a11d8"
],
"version": "==3.4.1"
},
"isort": {
"hashes": [
"sha256:cd5d3fc2c16006b567a17193edf4ed9830d9454cbeb5a42ac80b36ea00c23db4",
"sha256:79f46172d3a4e2e53e7016e663cc7a8b538bec525c36675fcfd2767df30b3983"
],
"version": "==4.2.15"
},
"lazy-object-proxy": {
"hashes": [
"sha256:209615b0fe4624d79e50220ce3310ca1a9445fd8e6d3572a896e7f9146bbf019",
"sha256:1b668120716eb7ee21d8a38815e5eb3bb8211117d9a90b0f8e21722c0758cc39",
"sha256:cb924aa3e4a3fb644d0c463cad5bc2572649a6a3f68a7f8e4fbe44aaa6d77e4c",
"sha256:2c1b21b44ac9beb0fc848d3993924147ba45c4ebc24be19825e57aabbe74a99e",
"sha256:320ffd3de9699d3892048baee45ebfbbf9388a7d65d832d7e580243ade426d2b",
"sha256:2df72ab12046a3496a92476020a1a0abf78b2a7db9ff4dc2036b8dd980203ae6",
"sha256:27ea6fd1c02dcc78172a82fc37fcc0992a94e4cecf53cb6d73f11749825bd98b",
"sha256:e5b9e8f6bda48460b7b143c3821b21b452cb3a835e6bbd5dd33aa0c8d3f5137d",
"sha256:7661d401d60d8bf15bb5da39e4dd72f5d764c5aff5a86ef52a042506e3e970ff",
"sha256:61a6cf00dcb1a7f0c773ed4acc509cb636af2d6337a08f362413c76b2b47a8dd",
"sha256:bd6292f565ca46dee4e737ebcc20742e3b5be2b01556dafe169f6c65d088875f",
"sha256:933947e8b4fbe617a51528b09851685138b49d511af0b6c0da2539115d6d4514",
"sha256:d0fc7a286feac9077ec52a927fc9fe8fe2fabab95426722be4c953c9a8bede92",
"sha256:7f3a2d740291f7f2c111d86a1c4851b70fb000a6c8883a59660d95ad57b9df35",
"sha256:5276db7ff62bb7b52f77f1f51ed58850e315154249aceb42e7f4c611f0f847ff",
"sha256:94223d7f060301b3a8c09c9b3bc3294b56b2188e7d8179c762a1cda72c979252",
"sha256:6ae6c4cb59f199d8827c5a07546b2ab7e85d262acaccaacd49b62f53f7c456f7",
"sha256:f460d1ceb0e4a5dcb2a652db0904224f367c9b3c1470d5a7683c0480e582468b",
"sha256:e81ebf6c5ee9684be8f2c87563880f93eedd56dd2b6146d8a725b50b7e5adb0f",
"sha256:81304b7d8e9c824d058087dcb89144842c8e0dea6d281c031f59f0acf66963d4",
"sha256:ddc34786490a6e4ec0a855d401034cbd1242ef186c20d79d2166d6a4bd449577",
"sha256:7bd527f36a605c914efca5d3d014170b2cb184723e423d26b1fb2fd9108e264d",
"sha256:ab3ca49afcb47058393b0122428358d2fbe0408cf99f1b58b295cfeb4ed39109",
"sha256:7cb54db3535c8686ea12e9535eb087d32421184eacc6939ef15ef50f83a5e7e2",
"sha256:0ce34342b419bd8f018e6666bfef729aec3edf62345a53b537a4dcc115746a33",
"sha256:e34b155e36fa9da7e1b7c738ed7767fc9491a62ec6af70fe9da4a057759edc2d",
"sha256:50e3b9a464d5d08cc5227413db0d1c4707b6172e4d4d915c1c70e4de0bbff1f5",
"sha256:27bf62cb2b1a2068d443ff7097ee33393f8483b570b475db8ebf7e1cba64f088",
"sha256:eb91be369f945f10d3a49f5f9be8b3d0b93a4c2be8f8a5b83b0571b8123e0a7a"
],
"version": "==1.3.1"
},
"mccabe": {
"hashes": [
"sha256:ab8a6258860da4b6677da4bd2fe5dc2c659cff31b3ee4f7f5d64e79735b80d42",
"sha256:dd8d182285a0fe56bace7f45b5e7d1a6ebcbf524e8f3bd87eb0f125271b8831f"
],
"version": "==0.6.1"
},
"pycodestyle": {
"hashes": [
"sha256:6c4245ade1edfad79c3446fadfc96b0de2759662dc29d07d80a6f27ad1ca6ba9",
"sha256:682256a5b318149ca0d2a9185d365d8864a768a28db66a84a2ea946bcc426766"
],
"version": "==2.3.1"
},
"pyflakes": {
"hashes": [
"sha256:cc5eadfb38041f8366128786b4ca12700ed05bbf1403d808e89d57d67a3875a7",
"sha256:aa0d4dff45c0cc2214ba158d29280f8fa1129f3e87858ef825930845146337f4"
],
"version": "==1.5.0"
},
"pylint": {
"hashes": [
"sha256:948679535a28afc54afb9210dabc6973305409042ece8e5768ca1409910c1ed8",
"sha256:1f65b3815c3bf7524b845711d54c4242e4057dd93826586620239ecdfe591fb1"
],
"version": "==1.7.4"
},
"six": {
"hashes": [
"sha256:832dc0e10feb1aa2c68dcc57dbb658f1c7e65b9b61af69048abc87a2db00a0eb",
"sha256:70e8a77beed4562e7f14fe23a786b54f6296e34344c23bc42f07b15018ff98e9"
],
"version": "==1.11.0"
},
"wrapt": {
"hashes": [
"sha256:d4d560d479f2c21e1b5443bbd15fe7ec4b37fe7e53d335d3b9b0a7b1226fe3c6"
],
"version": "==1.10.11"
},
"yapf": {
"hashes": [
"sha256:3ac5887aa98d0ba35186d8a83fa948b880a353cd39df9d9c9ffa920f428e9e8d",
"sha256:701b076a4916e3cfbba345e0297dcd54a02fd0fdcae1f43346f8a043c3bbd052"
],
"version": "==0.19.0"
}
}
}

View File

@ -1,21 +0,0 @@
#!/bin/sh
# Run this to generate all the initial makefiles, etc.
srcdir=`dirname $0`
test -z "$srcdir" && srcdir=.
PKG_NAME="guake"
(test -f $srcdir/src/guake/guake) || {
echo -n "**Error**: Directory "\`$srcdir\'" does not look like the"
echo " top-level $PKG_NAME directory"
exit 1
}
which gnome-autogen.sh || {
echo "You need to install gnome-common from GNOME SVN and make"
echo "sure the gnome-autogen.sh script is in your \$PATH."
exit 1
}
REQUIRED_AUTOMAKE_VERSION=1.9 USE_GNOME2_MACROS=1 . gnome-autogen.sh $@

View File

@ -1,103 +0,0 @@
# Copyright (C) 2007-2014 Guake authors
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 2 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public
# License along with this program; if not, write to the
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
AC_INIT([guake], [0.8.11], [http://guake-project.org/])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_MACRO_DIR([m4])
AM_INIT_AUTOMAKE([-Wall -Werror -Wno-extra-portability foreign])
AC_PROG_LIBTOOL
AC_PROG_CC
AC_PROG_INTLTOOL([0.35.0])
AM_GLIB_GNU_GETTEXT
dnl python checks
AM_PATH_PYTHON(2.7)
PY_PREFIX=`$PYTHON -c 'import sys ; print sys.prefix'`
PYTHON_LIBS="-lpython$PYTHON_VERSION"
PYTHON_CFLAGS="-I$PY_PREFIX/include/python$PYTHON_VERSION"
AC_SUBST([PYTHON_LIBS])
AC_SUBST([PYTHON_CFLAGS])
dnl gtk dependency
GTK_REQUIRED=2.10.0
PKG_CHECK_MODULES([DEPENDENCIES], [
gtk+-2.0 >= $GTK_REQUIRED
pygtk-2.0
x11
])
AC_SUBST([DEPENDENCIES_CFLAGS])
AC_SUBST([DEPENDENCIES_LIBS])
dnl expanding useful variables
AS_AC_EXPAND(LIBDIR, ${libdir})
AS_AC_EXPAND(BINDIR, ${bindir})
AS_AC_EXPAND(DATADIR, ${datarootdir})
dnl Checking python-vte
AC_MSG_CHECKING([for the python-vte package])
ac_pvte_result=`$PYTHON -c 'try:
import vte
except Exception, e:
print str(e)' 2> /dev/null`
if test -z "$ac_pvte_result"; then
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no])
AC_MSG_ERROR([cannot import Python module "vte".
Please check if you have python-vte installed. The error was:
$ac_pvte_result])
fi
dnl gconf
AC_PATH_PROG(GCONFTOOL, gconftool-2, no)
if test x"$GCONFTOOL" = xno; then
AC_MSG_ERROR([gconftool-2 executable not found in your path - should be installed with GConf])
fi
AM_GCONF_SOURCE_2
dnl Internationalization
GETTEXT_PACKAGE=guake
ALL_LINGUAS="ca cs de el es fa fr gl hr hu id it ja ko nb nl pa pl pt_BR ru sv tr uk zh_CN"
AC_SUBST([GETTEXT_PACKAGE])
AC_SUBST([ALL_LINGUAS])
dnl output files
AC_CONFIG_FILES([
Makefile
data/Makefile
data/guake.desktop
data/guake-prefs.desktop
data/org.guake.Guake.service
data/pixmaps/Makefile
data/icons/Makefile
po/Makefile.in
src/guake/Makefile
src/guake/globals.py
doc/src/conf.py
])
AC_OUTPUT

View File

@ -1,175 +0,0 @@
#!/usr/bin/env python
'''Check and sort import statement from a python file '''
import re
import sys
class FixImports(object):
'''
I can be used to check and sort import statement of a python file
Please use sortImportGroups() method
'''
_regexImport = re.compile(r"^import\s+(.*)")
_regexFromImport = re.compile(r"^from\s+([a-zA-Z0-9\._]+)\s+import\s+(.*)$")
_regexFromFutureImport = re.compile(r"^from\s+__future__\s+import\s+(.*)$")
def printErrorMsg(self, filename, lineNb, errorMessage):
''' I print the error message following pylint convention'''
print("%(filename)s:%(line_nb)s: %(error_msg)s" %
dict(filename=filename,
line_nb=lineNb,
error_msg=errorMessage))
def isImportLine(self, line):
'''I return True is the given line is an import statement, False otherwize'''
return self._regexImport.match(line) or self._regexFromImport.match(line)
def isBadLineFixable(self, line):
'''I return True is the given line is an import line than I know how to split'''
if self.isImportLine(line) and '(' not in line:
return True
return False
def analyzeLine(self, filename, line, lineNb):
'''I look at the line and print all error I find'''
res = True
if self.isImportLine(line):
if ',' in line:
self.printErrorMsg(filename, lineNb,
"multiple modules imported on one line - will fix")
res = False
if '\\' in line:
self.printErrorMsg(filename, lineNb,
"line-continuation character found - will fix.")
res = False
# these two don't occur in the Buildbot codebase, so we don't try to
# fix them
if ';' in line:
self.printErrorMsg(filename, lineNb,
"multiple import statement on one line. "
"Put each import on its own line.")
res = False
if '(' in line:
self.printErrorMsg(filename, lineNb,
"parenthesis character found. "
"Please import each module on a single line")
res = False
return res
def importOrder(self, line):
'''
I define how import lines should be sorted
return a tuple of order criterias sorted be importance
'''
ret = ("__future__" not in line, # always put __future__ import first
self._regexFromImport.match(line) is not None, # import before from import
line, # then lexicographic order
)
return ret
def sortImportGroups(self, filename, data=None):
'''
I perform the analysis of the given file, print the error I find and try to split and
sort the import statement
'''
lines = data.split("\n")
res = True
for cur_line_nb, line in enumerate(lines):
if not self.analyzeLine(filename, line, cur_line_nb):
if not self.isBadLineFixable(line):
res = False
if not res:
return False, data
# First split the import we can split
newlines = []
self.groups = []
self.group_start = None
def maybeEndGroup():
if self.group_start is not None:
self.groups.append((self.group_start, len(newlines)))
self.group_start = None
iter = lines.__iter__()
while True:
try:
line = iter.next()
except StopIteration:
break
if self.isImportLine(line):
# join any continuation lines (\\)
while line[-1] == '\\':
line = line[:-1] + iter.next()
if self.group_start is None:
self.group_start = len(newlines)
if self.isBadLineFixable(line):
match = self._regexFromImport.match(line)
if match:
module = match.group(1)
imports = [s.strip() for s in match.group(2).split(",")]
for imp in imports:
newlines.append("from %s import %s" % (module, imp))
continue
else:
maybeEndGroup()
newlines.append(line)
maybeEndGroup()
lines = newlines
for start, end in self.groups:
lines[start:end] = sorted(lines[start:end], key=self.importOrder)
# reiterate line by line to split mixed groups
splitted_groups_lines = []
prev_import_line_type = ""
for line in lines:
if not line.strip() or not self.isImportLine(line):
splitted_groups_lines.append(line)
prev_import_line_type = ""
else:
import_match = self._regexImport.match(line)
from_match = self._regexFromImport.match(line)
current_line_type = None
if import_match is not None:
module = import_match
current_line_type = "import"
elif from_match is not None:
module = from_match
current_line_type = "from"
assert(current_line_type)
if prev_import_line_type and current_line_type != prev_import_line_type:
splitted_groups_lines.append("")
prev_import_line_type = current_line_type
splitted_groups_lines.append(line)
return True, "\n".join(splitted_groups_lines)
def main():
'''I am the main method'''
if len(sys.argv) != 2:
print "usage: %s <python file>" % (sys.argv[0],)
sys.exit(1)
filename = sys.argv[1]
with open(filename, 'r') as filedesc:
data = filedesc.read()
res, content = FixImports().sortImportGroups(filename, data)
if not res:
sys.exit(1)
with open(filename, 'w') as filedesc:
filedesc.write(content)
if data != content:
print "import successfully reordered for file: %s" % (filename)
sys.exit(0)
if __name__ == "__main__":
main()

View File

@ -517,7 +517,7 @@ class PrefsDialog(SimpleGladeApp):
treeview.set_rules_hint(True)
# TODO PORT this is killing the editing of the accl
#treeview.connect('button-press-event', self.start_editing)
# treeview.connect('button-press-event', self.start_editing)
renderer = Gtk.CellRendererText()
column = Gtk.TreeViewColumn('keypath', renderer, text=0)
@ -544,7 +544,6 @@ class PrefsDialog(SimpleGladeApp):
demo_terminal_box = self.get_widget('demo_terminal_box')
demo_terminal_box.add(self.demo_terminal)
default_params = {}
pid = self.spawn_sync_pid(None, self.demo_terminal)
self.demo_terminal.pid = pid

View File

@ -1,40 +0,0 @@
dnl AS_AC_EXPAND(VAR, CONFIGURE_VAR)
dnl
dnl example
dnl AS_AC_EXPAND(SYSCONFDIR, $sysconfdir)
dnl will set SYSCONFDIR to /usr/local/etc if prefix=/usr/local
AC_DEFUN([AS_AC_EXPAND],
[
EXP_VAR=[$1]
FROM_VAR=[$2]
dnl first expand prefix and exec_prefix if necessary
prefix_save=$prefix
exec_prefix_save=$exec_prefix
dnl if no prefix given, then use /usr/local, the default prefix
if test "x$prefix" = "xNONE"; then
prefix=$ac_default_prefix
fi
dnl if no exec_prefix given, then use prefix
if test "x$exec_prefix" = "xNONE"; then
exec_prefix=$prefix
fi
full_var="$FROM_VAR"
dnl loop until it doesn't change anymore
while true; do
new_full_var="`eval echo $full_var`"
if test "x$new_full_var"="x$full_var"; then break; fi
full_var=$new_full_var
done
dnl clean up
full_var=$new_full_var
AC_SUBST([$1], "$full_var")
dnl restore prefix and exec_prefix
prefix=$prefix_save
exec_prefix=$exec_prefix_save
])

View File

@ -1,8 +0,0 @@
pylint <= 1.4.3
astroid <= 1.3.8
pep8 >= 1.7.0
autopep8 >= 1.2.2
pyflakes >= 1.1.0
pip-tools
pytest
mock

View File

@ -1,22 +0,0 @@
#
# This file is autogenerated by pip-compile
# Make changes in python-requirements.in, then run this to update:
#
# pip-compile python-requirements.in
#
astroid==1.3.8
autopep8==1.2.2
click==6.6 # via pip-tools
first==2.0.1 # via pip-tools
logilab-common==1.2.1 # via astroid, pylint
pep8==1.7.0
pip-tools==1.6.5
pyflakes==1.1.0
pylint==1.4.3
six==1.10.0 # via astroid, logilab-common, pip-tools, pylint
mock==2.0.0
pytest==3.0.1
# The following packages are commented out because they are
# considered to be unsafe in a requirements file:
# setuptools # via logilab-common

View File

@ -1,2 +0,0 @@
#!/bin/sh
PYTHONPATH=./src py.test src/tests

46
setup.cfg Normal file
View File

@ -0,0 +1,46 @@
[metadata]
name = Guake
summary = Guake Terminal
description-file = README.rst
author = Gaetan Semet
author-email = gaetan@xeberon.net
home-page = https://github.com/Guake/guake
classifier =
Intended Audience :: Information Technology
Intended Audience :: System Administrators
License :: OSI Approved :: MIT License
Operating System :: OS Independent
Programming Language :: Python
Programming Language :: Python :: 3.6
Topic :: Multimedia :: Video
[files]
packages =
guake
[entry_points]
console_scripts =
guake = guake.main:main
[build_sphinx]
source-dir = doc/source
build-dir = doc/build
all_files = 1
[upload_sphinx]
upload-dir = doc/build/html
[pbr]
warnerrors = True
[wheel]
universal = 1
[bdist_wheel]
# This flag says that the code is written to work on both Python 2 and Python
# 3. If at all possible, it is good practice to do this. If you cannot, you
# will need to generate wheels for each Python version that you support.
universal=1
[pep8]
max-line-length = 100

18
setup.py Normal file
View File

@ -0,0 +1,18 @@
# -*- coding: utf-8 -*-
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import setuptools
# In python < 2.7.4, a lazy loading of package `pbr` will break
# setuptools if some other modules registered functions in `atexit`.
# solution from: http://bugs.python.org/issue15881#msg170215
try:
import multiprocessing # noqa
except ImportError:
pass
setuptools.setup(setup_requires=['pbr'],
pbr=True)