Commit Graph

38 Commits

Author SHA1 Message Date
Calum Lind 97e7d95dd3 Cleanup tox configuration
There were issues with dependencies and tox environments under Python 3
so refactored the tox configuration to be more consistent and clearer.

- Moved travis to default to Python 3 for linting and tests.
- Fixed missing mock for cairo in sphinx config.
- Collated the base deps sections to improve readability.
- Added PYTEST_ADDOPTS env to override pytest verbosity in just tox
  tests as this was a common option being used.
- Renamed env 'testcoverage' to the more concise 'coverage' and moved
  html creation under single env as handy to have this output as well
  as report.
- Cleaned up the isort config for gtk3.
- Added `bad-continuation` to pylint config as conflcts with black
  formatting.
- Fix isort issue with bbfreeze script. This will likely be removed
  in future so just skip sorting it.
2018-11-02 08:47:57 +00:00
Calum Lind 860730d43c [Packaging] Update make_release script for Py3
xz compression is included in Python 3 so simplify script.
2018-10-19 14:14:03 +01:00
Calum Lind 20fa106b8b Update pre-commit config
The prettier hook was missing a trailing slash so omitting css files.

Add a trailing space fix hook and fix issues.
2018-10-08 14:49:36 +01:00
Calum Lind a8a4fb69c0 [Lint] Exclude js and css from EOF fixer
- When running pre-commit on all files it is picking up minified js and
  css files. Since prettier will format correctly the source files ignore
  them in end-of-file fixer.
- The template files in web docs can be ignored too.
- Removed the unneeded `pre-commit-hooks` dependency as pre-commit
  resolves that itself.
- Include files fixed by pre-commit.
2018-10-05 18:45:37 +01:00
Calum Lind b1cdc32f73 [Lint] Use Black to auto-format code
The move to using auto-formatter makes it easier to read, submit and
speeds up development time. https://github.com/ambv/black/

Although I would prefer 79 chars, the default line length of 88 chars
used by black suffices. The flake8 line length remains at 120 chars
since black does not touch comments or docstrings and this will require
another round of fixes.

The only black setting that is not standard is the use of double-quotes
for strings so disabled any formatting of these. Note however that
flake8 will still flag usage of double-quotes. I may change my mind on
double vs single quotes but for now leave them.

A new pyproject.toml file has been created for black configuration.
2018-10-03 15:21:53 +01:00
Calum Lind 74aa0db956 Manually compress png with zopflipng 2018-06-21 14:50:19 +01:00
Calum Lind d642fa3989 Fix files to pass new Flake8 checkers
Some new flake8 checkers were added so fix these new warnings and
any issues uncovered.

Use add-trailing-comma to fix missing trailing commas. It does not
format it as well as I would like however it was fast to change and
helps with git changes in future.

Removed pylint from tox due to large number of warnings.
2018-06-01 23:41:17 +01:00
Calum Lind 51bde704b5 [Packaging] Simplify release script using sdist
* setup.py sdist now creates a pristine tar which can be used for release.
 * Uses the version currently checked-out in git.
 * Removed unneeded lines in manifest.
2017-06-27 18:12:51 +01:00
Calum Lind 3c1d7da698 [Packaging] Apply fixes to OSX app scripts
* Fix path to dist dir
 * Rename dylib with new soversion for lt 1.1.x
 * Create Info.plist with version and year automatically
2017-06-27 14:00:06 +01:00
Calum Lind 3f1ff54887 [Packaging] Fix using wrong commit id 2017-06-25 19:22:13 +01:00
Calum Lind a7c4228ce7 Update systemd service files
- Add man page link
 - Ensure deluge-web is not daemonised
2017-06-23 10:12:07 +01:00
Calum Lind fefe742ea1 [Packaging] Add a make_release file for source packaging 2017-05-17 13:56:56 +01:00
Calum Lind 0c36b63f22 Cleanup infolist and changelog 2017-05-16 12:00:28 +01:00
Calum Lind 5a3625f6cd Add systemd service files to packaging dir 2017-03-20 19:16:50 +00:00
Calum Lind 011afe3e89 [#2879] [OSX] Fix dyld error opening file from within Deluge
- Using DYLD_LIBRARY_PATH seems to have the unintended effect of making associated apps
   unusable (unable to locate dylds) when opening a file from within Deluge. The workaround
   for now is to switch to using DYLD_FALLBACK_LIBRARY_PATH.
2017-02-22 11:20:51 +00:00
Calum Lind 36cbfa8c61 [Lint] Fix files to pass Flake8 v3.2.0 2016-11-17 12:19:41 +00:00
Calum Lind af6b277d28 [Lint] Add flake8-quotes to tox and fix bad quotes 2016-11-04 00:10:23 +00:00
Calum Lind 3a2ff0c188 [Lint] Convert all python double quotes to single quotes
* A rather disruptive change but for a few reasons such as easier to read,
   easier type, keep consistent and javascript code uses single quotes.
 * There are a few exceptions for the automated process:
    * Any double quotes in comments
    * Triple double quotes for docstrings
    * Strings containing single quotes are left e.g. "they're"

 * To deal with merge conflicts from feature branches it is best to follow
   these steps for each commit:
     * Create a patch: `git format-patch -1 <sha1>`
     * Edit the patch and replace double quotes with single except those in
       comments or strings containing an unescaped apostrophe.
     * Check the patch `git apply --check <patchfile>` and fix any remaining
       issues if it outputs an error.
     * Apply the patch `git am < <patchfile>`
2016-11-03 21:45:45 +00:00
Calum Lind 6971e08b0d [#2828] [Packaging] Fix ImportError with setuptools version > 18.8 2016-05-19 17:21:19 +01:00
Calum Lind 979ad972fe [#2767] [Packaging] Don't include .py files in OSX App 2015-12-11 18:51:08 +00:00
Calum Lind 075542e4a5 [OSX] Fix starting deluged from connection manager 2015-12-11 12:11:38 +00:00
Calum Lind 227863faf7 [#2777] Update MSVC SP1 check to latest release CLID 2015-11-23 23:30:50 +00:00
Calum Lind d280fa9fbd [Lint] Cleanup helper scripts to pass PyLint 2015-10-30 18:39:52 +00:00
Calum Lind a2a074fb4f osx file in wrong location 2015-09-23 00:32:54 +01:00
Calum Lind fbf5d5287f [Packaging] Minor osx updates 2015-09-20 15:50:22 +01:00
Calum Lind f834ff6ec5 [Packaging] Updates to osx scripts
* bundle_contents now appends 'Contents' without adding it twice.
 * Remove reference to non-existent gdk-pixbuf.loaders
 * Separate libtorrent in new module.
 * Update lib versions for bundle file.
2015-09-18 22:59:52 +01:00
Calum Lind 7fccfa0651 [Packaging] Updates to the NSIS Installer script
* New message box popup if VC 2008 Redist package not detected.
 * Add Start Menu page to choose where/if to install items.
 * Add desktop shortcut install option to finish page.
 * Clean up spacing and use consistent 4 spaces to indent.
 * Exclude as many unneeded pygame libraries as possible.
2015-09-18 22:31:39 +01:00
Calum Lind ff6b52edc6 [Win32] Fix output exes in bbfreeze 2015-09-13 22:53:28 +01:00
Calum Lind 40c0c8ef6a [#2325] [Packaging] Fix uninstaller deleting non-deluge files 2015-09-10 14:24:32 +01:00
Calum Lind 8345237dcc [Packaging] bbfreeze updates
* No need for data_files to be installed on windows
2015-08-27 11:27:49 +01:00
Calum Lind 50f6f2d3ec [Packaging] bbfreeze tweaks and comments
* Reduce output from bbfreeze and add debug option to enable again.
2015-08-26 17:25:33 +01:00
Calum Lind 4b3684bc5d [Packaging] Fix typo in bbfreeze 2015-08-26 12:08:06 +01:00
Calum Lind d2a2631a70 Flake8 bbfreeze 2015-08-24 15:55:14 +01:00
Calum Lind 1c3e14919f [Win32] Refactor bbreeze script
* In setup.py put web and deluged back into console_script as the gtkui hack in
bbfreeze is a windows only issue for popup cmd windows showing.
 * Altered the bbreeze script to find any deluge scripts in pythonpath.
 * Use setIcon now in bbfreeze and use icon from package.
 * Use version stamp from pywin32.
2015-08-24 15:35:25 +01:00
Calum Lind 0ee8c7d70f [#2736] [Win32] Add version info to exe files 2015-08-24 14:56:53 +01:00
doadin 71b5e0a296 [#2758] [win32] Include _cffi_backend module in bbfreeze 2015-08-24 14:56:53 +01:00
Calum Lind a4844f7b77 [win32] Update packaging scripts
* Update directory paths.
2015-08-24 14:56:53 +01:00
Calum Lind d96633f3f7 Create a packaging directory 2015-08-21 09:58:30 +01:00