Commit Graph

80 Commits

Author SHA1 Message Date
Florian Bruhin 7f45b178c9 Adjust imports 2025-10-11 20:49:52 +02:00
Teddy ff76871f4e replacing os.path with pathlib 2025-10-11 17:14:45 +02:00
Florian Bruhin d15052a67a Add stub pyproject.toml file
This keeps our setup.py around for now, while still supporting a PEP-517
compliant build. It's the minimum required change to make modern pyroma stop
complaining, and hopefully to avoid deprecation warnings.

Partially duplicates #8560
See #3526
2025-07-07 08:00:29 +02:00
Florian Bruhin e4ab45e3b2 setup: Move from deprecated license classifier to SPDX 2025-03-21 11:25:45 +01:00
Florian Bruhin 946ec0ab25 py313: Update docs
See #8205
2024-12-09 16:15:01 +01:00
Florian Bruhin 3288ec8598 Adjust Python versions in setup.py 2024-10-13 18:24:44 +02:00
Florian Bruhin 0718b25796 reuse: Initial copyright text update for myself
git ls-files | \
    xargs sed -Ei 's/Copyright [0-9]{4}(-[0-9]{4}) Florian Bruhin \(The Compiler\) <mail@qutebrowser\.org>/SPDX-FileCopyrightText: Florian Bruhin (The Compiler) <mail@qutebrowser.org>/'
2023-07-23 12:49:05 +02:00
Florian Bruhin b2aaba6043 reuse: Adjust most license headers
git ls-files | xargs grep -l "is free software"  | xargs reuse annotate --license="GPL-3.0-or-later" --skip-unrecognised
2023-07-23 12:11:07 +02:00
Philipp Albrecht 1bd1c89256 Include qutebrowser *and* qutebrowser.* 2023-07-13 10:50:07 +02:00
Philipp Albrecht c4fff2fa83 Use explicit include 2023-07-13 10:44:55 +02:00
Philipp Albrecht 56062421e5 Map qutebrowser package to qutebrowser dir 2023-07-13 10:34:57 +02:00
Philipp Albrecht 2a34c15b69 Specify qutebrowser package via where= 2023-07-13 10:28:23 +02:00
Philipp Albrecht 0781e0d046 Include namespace packages in setuptools build
Building qutebrowser showed some warnings as the following:

```
/tmp/build-env-4jb2oh0t/lib/python3.8/site-packages/setuptools/command/build_py.py:201: _Warning: Package 'qutebrowser.html' is absent from the `packages` configuration.
!!

        ********************************************************************************
        ############################
        # Package would be ignored #
        ############################
        Python recognizes 'qutebrowser.html' as an importable package[^1],
        but it is absent from setuptools' `packages` configuration.

        This leads to an ambiguous overall configuration. If you want to distribute this
        package, please make sure that 'qutebrowser.html' is explicitly added
        to the `packages` configuration field.

        Alternatively, you can also rely on setuptools' discovery methods
        (for example by using `find_namespace_packages(...)`/`find_namespace:`
        instead of `find_packages(...)`/`find:`).

        You can read more about "package discovery" on setuptools documentation page:

        - https://setuptools.pypa.io/en/latest/userguide/package_discovery.html

        If you don't want 'qutebrowser.html' to be distributed and are
        already explicitly excluding 'qutebrowser.html' via
        `find_namespace_packages(...)/find_namespace` or `find_packages(...)/find`,
        you can try to use `exclude_package_data`, or `include-package-data=False` in
        combination with a more fine grained `package-data` configuration.

        You can read more about "package data files" on setuptools documentation page:

        - https://setuptools.pypa.io/en/latest/userguide/datafiles.html

        [^1]: For Python, any directory (with suitable naming) can be imported,
              even if it does not contain any `.py` files.
              On the other hand, currently there is no concept of package data
              directory, all directories are treated like packages.
        ********************************************************************************

!!
```

Using `find_namespace_packages()` as suggested in the setuptools docs[1] solved the issue.

[1] https://setuptools.pypa.io/en/latest/userguide/package_discovery.html#finding-namespace-packages
2023-07-12 10:46:46 +02:00
Philipp Albrecht d9e8b638bf Remove vim modelines
We're deprecating vim modelines in favor of `.editorconfig`.

Removing vim modelines could be done using two one-liners. Most of the vim modelines
were followed by an empty line, so this one-liner took care of these ones:

```sh
rg '^# vim: .+\n\n' -l | xargs sed -i '/^# vim: /,+1d'
```

Then some of the vim modelines were followed by a pylint configuration line, so running
this one-liner afterwards took care of that:

```sh
rg '^# vim:' -l | xargs sed -i '/^# vim: /d'
```
2023-06-30 11:03:06 +02:00
Florian Bruhin 93c7fdd60c Initial Python 3.7 drop 2023-06-26 14:39:54 +02:00
Jimmy 060e4fbf80 Drop python3.6 support.
Commits for dropping 3.5 support to copy from:

c245b7d855ccd "Initial drop of Python 3.5"
ccdfb44b85 "Drop support for Python 3.6.0"

Anything needed to update regarding OS version support in
doc/install.asciidoc?
TODO: remove 3.6/7 annotations in requirements files and
  rebuild

workflows: not sure I updated it right (run 5.12 with 3.7, same 18.04 OS) but
18.04 seems to have 3.7 on it too so it should work. It'll all change when we
drop <5.15 anyway. Not sure what the minimum ubuntu version will be going
forward.

Regarding mimetype overrides (ebb3046822) the doctring says they can all go
in 3.7 but .h5 is still missing on py39, not sure if we should care.

There are a bunch of old(?) warning messages still ignored in tests/end2end/fixtures/quteprocess.py.
2022-04-04 12:08:19 +12:00
Florian Bruhin 1a4fff1a42 doc: Switch URLs to https 2021-01-26 15:19:01 +01:00
Florian Bruhin 222f1f19a1 Bump copyright years
Closes #6015
2021-01-20 20:06:19 +01:00
Florian Bruhin 21b20116f5 Go back to a normal setup.py
For some reason, despite using "find:" for the package and this working
fine for the sdist, the qutebrowser-git Archlinux package doesn't
actually include any qutebrowser/ files anymore.

This currently really doesn't seem to be worth the trouble...

See #3526

This reverts commit 90323d1d98.
This reverts commit 21ee2fe882.
2021-01-19 19:14:55 +01:00
Florian Bruhin 90323d1d98 Switch to declarative setup.py metadata
Switches #3526
2021-01-19 18:13:28 +01:00
Florian Bruhin 0d64ae3fe3 Finish dropping PyPEG2
Closes #1161
2021-01-17 13:18:41 +01:00
Florian Bruhin 739ebd5e3e dataclasses: Remaining dependency changes
See #6023
2021-01-13 20:27:37 +01:00
Florian Bruhin 9a8b7e8e98 Make pygments dependency optional
Closes #5555
2021-01-09 14:20:09 +01:00
Eli Schwartz 1649c6fe19
Migrate read_file from pkg_resources to importlib.resources
In python 3.9, we can get any resource from a package subdirectory using
files(), but on older versions of python, even where importlib.resources exists,
we need the backport.
2020-12-07 14:25:05 -05:00
Florian Bruhin 685a66280a Initial drop of Python 3.5
See #4800
2020-10-26 15:50:54 +01:00
Florian Bruhin 68f3778bfa Add Python 3.9 classifier
See https://github.com/qutebrowser/qutebrowser/discussions/5658
2020-08-11 13:17:54 +02:00
Florian Bruhin 419f25bbee Update PyPI classifiers 2020-06-24 17:49:14 +02:00
Florian Bruhin cbb38c5285 Upgrade documented Python versions 2020-05-11 21:06:00 +02:00
Florian Bruhin 9e4276db9b Adjust copyrights for 2020 2020-01-04 18:21:17 +01:00
Florian Bruhin 93db418d98 Fix setup.py after __init__.py changes
Fixes #4907
2019-07-11 17:49:03 +02:00
Jay Kamat 3e816f5f8b
Update copyright for 2019 2019-02-22 21:45:08 -08:00
Florian Bruhin 52c44d3da6 setup.py: Set long_description_content_type
Otherwise, Warehouse (new PyPI) refuses the upload...
2018-05-29 11:23:10 +02:00
Florian Bruhin f25e706e11 Add Python 3.7 compatibility to setup.py 2018-02-10 20:08:33 +01:00
Florian Bruhin dbefaccf06 Set python_requires in setup.py 2017-11-15 09:47:45 +01:00
Florian Bruhin 3f18a5ada7 Update metainfo in setup.py 2017-09-21 22:57:29 +02:00
Florian Bruhin c74236dd96 Move some data from setupcommon to setup.py
We can't get rid of setupcommon entirely (it's needed by PyInstaller), but at
least we can get the data back to setup.py.

Fixes #2996
2017-09-21 22:54:58 +02:00
Florian Bruhin 3a5241b642 Start using attrs
Closes #1073
2017-09-19 22:21:45 +02:00
Florian Bruhin 822623f2ed Finally update copyrights... 2017-05-09 21:37:03 +02:00
Florian Bruhin 5311576c34 Check pep257 via flake8.
We'll still keep the pydocstyle environment though until flake8-pep257 adds
support for that:

https://github.com/Robpol86/flake8-pep257/issues/6
2016-02-10 19:18:47 +01:00
Florian Bruhin 956baed76b Use exclude= instead of include= for find_packages.
It seems the old setuptool version in Ubuntu Trusty doesn't have include=...
2015-06-26 19:45:56 +02:00
Florian Bruhin 97cc90b49f Revert "Revert "Don't install scripts package.""
This reverts commit 345d048f43.
2015-06-26 19:25:58 +02:00
Florian Bruhin 345d048f43 Revert "Don't install scripts package."
This reverts commit f61aaa9053.
2015-06-26 10:00:36 +02:00
Florian Bruhin f61aaa9053 Don't install scripts package.
See #783.
2015-06-26 09:47:34 +02:00
Florian Bruhin 8f1d81a644 Add session support.
Closes #12.
See #499.
See #11.

This adds PyYAML as a new dependency.

It adds the following new commands:

    :session-delete <name>
    Delete a session.

    :session-load <name>
    Load a session.

    :session-save [<name>]
    Save a session.

    :wq [<name>]
    Save open pages and quit.

And the following new settings:

    general -> save-session:
    Whether to always save the open pages.
2015-02-16 20:26:09 +01:00
Florian Bruhin 450d1ab70d Update copyright years 2015-01-03 15:51:31 +01:00
Florian Bruhin d1d6fb3dce Use Qt resources for the window icon. 2014-12-28 15:10:02 +01:00
Florian Bruhin ea5ee0e7c8 Only remove icon tree if necessary. 2014-12-28 14:52:35 +01:00
Florian Bruhin f1435ce51f Use a dirty hack to copy icon files into package.
See #325.
2014-12-28 14:50:25 +01:00
Florian Bruhin 2a4e884e1b Set window icon. Closes #325. 2014-12-28 14:35:28 +01:00
Florian Bruhin 17b26f7ba9 Remove extras_require from setup.py 2014-12-04 20:28:56 +01:00