mirror of
https://github.com/OfflineIMAP/offlineimap3.git
synced 2025-12-14 20:35:43 +01:00
This patch includes a lot of changes: 1. Split the `requirements.txt` file in multiple files. This change holds the required packages for OfflineIMAP in the `requirements.txt` file. The optional packages are included in the files `requirements-option.txt` files. Now the standard OfflineIMAP configuration does not include packages like `cygwin`. See for example issue #192. 2. The `setup.py` process includes a lot of files (see issue #110). This creates a problem in the setup process, because some libraries are not found (see #39, the problem still happends). For this reason we can read the variables from the `offlineimap/__init__py` to include them in the `setup.py` script, without import the `offlineimap` module. I used the method presented at `https://www.youtube.com/watch?v=fHNhhHMUW7k`. In the setup module we don't need the testing code (it creates the import problem too), so this code is removed. To read the variables, we use some regex search in the `offlineimap/__init__py` file, save the values as variables, and then use them in the `setup()` call. 3. `setup.py` uses requires and extra_requires libraries, aligned with the `requirements` files. We use four different options: `kerberos`, `keyring`, `cygwin`, `cygwin` and `testinternet`. 4. `pyproject.toml`. This file is fully rewritten. The file use now the right dependencies, includes the optional dependencies aligned with the requirements and the `setup.py` files. The file include other details, like classifiers, URLs,... This script uses now the the `project.scripts` option, with the module and the method to call when the setup file is created. Then, this script includes as module `offlineimap.init`, and the startup method is `main`. Because this method is new, this method and the `__main__` functions are created in the `offlineimap/init.py` file: ```python def main(): oi = OfflineImap() oi.run() if __name__ == "__main__": main() ``` With these changes, the setup process works fine, with and without optional modules. Finally, the folder `offlineimap.egg-info`, created in the setup process is included in the `.gitignore` file. It is possible check the creation using: ```python python -m pip install . ``` And then use the command `offilineimap` to use the module. Finally, the `bin/offlineimap` command is not used, so we probably can remove it. Fix: #192, Fix: #110, Fix: #39, Fix: #90
2 lines
17 B
Plaintext
2 lines
17 B
Plaintext
gssapi[kerberos]
|