tedit 0.9.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,60 @@
1
+ TEdit Pip-Only Public Use License v1.0
2
+ Identifier: LicenseRef-TE-Pip-Only-1.0
3
+
4
+ Copyright © 2024–2025 alby13 (“Licensor”). All rights reserved.
5
+
6
+ 1. Definitions
7
+
8
+ Software means the TEdit (Text Editor) program and accompanying files owned by Licensor.
9
+
10
+ Authorized Channel means the Python Package Index (PyPI) and installation via the pip tool using the official package published by Licensor.
11
+
12
+ Authorized Copy means an unmodified copy of the Software obtained from the Authorized Channel and installed via pip.
13
+
14
+ You means the individual or entity exercising rights under this license.
15
+
16
+ 2. Limited License Grant (Pip-Only)
17
+
18
+ Subject to your full compliance with this license, Licensor grants you a limited, non-exclusive, non-transferable, revocable, royalty-free license to install and run the Software solely as an Authorized Copy installed via pip from the Authorized Channel. This license covers any purpose (including commercial use) and is provided free of charge; it does not grant support, warranties, or updates.
19
+
20
+ Redistribution Exception for PyPI: Unmodified copies of the package files (sdists and wheels) obtained from the official PyPI project page may be reproduced and redistributed solely for the purpose of installation via pip, including via caches and mirrors that support PyPI and pip.
21
+
22
+ 3. Restrictions
23
+
24
+ Except as expressly permitted in Section 2, you may not:
25
+
26
+ Run the Software from source, from a git checkout, from local editable installs, or from any distribution channel other than the Authorized Channel.
27
+
28
+ Modify, adapt, translate, create derivative works of, reverse engineer, decompile, or disassemble the Software, except to the extent such restrictions are prohibited by applicable law.
29
+
30
+ Copy, redistribute, publish, sell, sublicense, host, mirror, or make the Software available to others (including by re-packaging or re-uploading to any index, repository, or app store).
31
+
32
+ Remove or alter copyright, license, or attribution notices.
33
+
34
+ 4. Contributor Development Exception (Non-Production)
35
+
36
+ Individuals contributing changes to the Software may run it from source solely for development and testing in order to submit contributions back to Licensor. This exception does not permit production use, redistribution, or any other use from source.
37
+
38
+ 5. Third-Party Components
39
+
40
+ The Software may bundle or interface with third-party libraries that are licensed under their own terms (e.g., PSF License, BSD-3-Clause). Those licenses govern the third-party components; this license governs the original portions of the Software.
41
+
42
+ 6. Ownership
43
+
44
+ The Software is licensed, not sold. Licensor retains all right, title, and interest in and to the Software.
45
+
46
+ 7. Termination
47
+
48
+ This license terminates automatically if you breach it. Upon termination, you must cease all use of the Software. Sections 3, 5, 6, 8, and 9 survive termination.
49
+
50
+ 8. Disclaimer of Warranty
51
+
52
+ THE SOFTWARE IS PROVIDED “AS IS” AND “AS AVAILABLE,” WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED.
53
+
54
+ 9. Limitation of Liability
55
+
56
+ TO THE MAXIMUM EXTENT PERMITTED BY LAW, LICENSOR IS NOT LIABLE FOR ANY INDIRECT, INCIDENTAL, SPECIAL, CONSEQUENTIAL, EXEMPLARY, OR PUNITIVE DAMAGES, OR FOR ANY LOSS OF PROFITS, REVENUE, DATA, OR GOODWILL.
57
+
58
+ 10. General
59
+
60
+ This is a custom, proprietary license and is not an open-source license. If any provision is unenforceable, the remainder remains in effect. Use of trademarks, names, or logos is not licensed.
tedit-0.9.0/PKG-INFO ADDED
@@ -0,0 +1,20 @@
1
+ Metadata-Version: 2.4
2
+ Name: tedit
3
+ Version: 0.9.0
4
+ Summary: TE: a cross-platform terminal text editor with mouse support and coding syntax highlighting.
5
+ Author-email: alby13 <alby13@singularityon.com>
6
+ License-Expression: LicenseRef-TE-Pip-Only-1.0
7
+ Project-URL: Homepage, https://github.com/alby13/TE-Text-Editor
8
+ Project-URL: Issues, https://github.com/alby13/TE-Text-Editor/issues
9
+ Classifier: Environment :: Console :: Curses
10
+ Classifier: Programming Language :: Python :: 3
11
+ Classifier: Topic :: Text Editors
12
+ Requires-Python: >=3.8
13
+ Description-Content-Type: text/markdown
14
+ License-File: LICENSE.txt
15
+ License-File: licenses/LICENSE_PSF.txt
16
+ License-File: licenses/LICENSE_BSD.txt
17
+ Requires-Dist: pygments>=2.10
18
+ Requires-Dist: pyperclip>=1.8
19
+ Requires-Dist: windows-curses; platform_system == "Windows"
20
+ Dynamic: license-file
@@ -0,0 +1,9 @@
1
+ Copyright <YEAR> <COPYRIGHT HOLDER>
2
+
3
+ Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
4
+
5
+ 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
6
+
7
+ 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
8
+
9
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@@ -0,0 +1,42 @@
1
+ PYTHON SOFTWARE FOUNDATION LICENSE VERSION 2
2
+
3
+ 1. This LICENSE AGREEMENT is between the Python Software Foundation ("PSF"), and
4
+ the Individual or Organization ("Licensee") accessing and otherwise using this
5
+ software ("Python") in source or binary form and its associated documentation.
6
+
7
+ 2. Subject to the terms and conditions of this License Agreement, PSF hereby
8
+ grants Licensee a nonexclusive, royalty-free, world-wide license to reproduce,
9
+ analyze, test, perform and/or display publicly, prepare derivative works,
10
+ distribute, and otherwise use Python alone or in any derivative
11
+ version, provided, however, that PSF's License Agreement and PSF's notice of
12
+ copyright, i.e., "Copyright © 2001-2024 Python Software Foundation; All Rights
13
+ Reserved" are retained in Python alone or in any derivative version
14
+ prepared by Licensee.
15
+
16
+ 3. In the event Licensee prepares a derivative work that is based on or
17
+ incorporates Python or any part thereof, and wants to make the
18
+ derivative work available to others as provided herein, then Licensee hereby
19
+ agrees to include in any such work a brief summary of the changes made to Python.
20
+
21
+ 4. PSF is making Python available to Licensee on an "AS IS" basis.
22
+ PSF MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED. BY WAY OF
23
+ EXAMPLE, BUT NOT LIMITATION, PSF MAKES NO AND DISCLAIMS ANY REPRESENTATION OR
24
+ WARRANTY OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE
25
+ USE OF PYTHON WILL NOT INFRINGE ANY THIRD PARTY RIGHTS.
26
+
27
+ 5. PSF SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON
28
+ FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS A RESULT OF
29
+ MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON, OR ANY DERIVATIVE
30
+ THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF.
31
+
32
+ 6. This License Agreement will automatically terminate upon a material breach of
33
+ its terms and conditions.
34
+
35
+ 7. Nothing in this License Agreement shall be deemed to create any relationship
36
+ of agency, partnership, or joint venture between PSF and Licensee. This License
37
+ Agreement does not grant permission to use PSF trademarks or trade name in a
38
+ trademark sense to endorse or promote products or services of Licensee, or any
39
+ third party.
40
+
41
+ 8. By copying, installing or otherwise using Python, Licensee agrees
42
+ to be bound by the terms and conditions of this License Agreement.
@@ -0,0 +1,41 @@
1
+ [project]
2
+ name = "tedit" # distribution name on PyPI
3
+ version = "0.9.0" # aligns with Build #9
4
+ description = "TE: a cross-platform terminal text editor with mouse support and coding syntax highlighting."
5
+ readme = "README.md"
6
+ requires-python = ">=3.8"
7
+ authors = [{ name = "alby13", email = "alby13@singularityon.com" }]
8
+
9
+ # PEP 639 license fields
10
+ license = "LicenseRef-TE-Pip-Only-1.0"
11
+ license-files = ["LICENSE.txt", "licenses/LICENSE_PSF.txt", "licenses/LICENSE_BSD.txt"]
12
+
13
+ # optional classifiers (non-license ones are fine)
14
+ classifiers = [
15
+ "Environment :: Console :: Curses",
16
+ "Programming Language :: Python :: 3",
17
+ "Topic :: Text Editors",
18
+ ]
19
+
20
+ dependencies = [
21
+ "pygments>=2.10",
22
+ "pyperclip>=1.8",
23
+ "windows-curses; platform_system == 'Windows'"
24
+ ]
25
+
26
+ [project.urls]
27
+ Homepage = "https://github.com/alby13/TE-Text-Editor"
28
+ Issues = "https://github.com/alby13/TE-Text-Editor/issues"
29
+
30
+ # two CLI entry points pointing to the same function
31
+ [project.scripts]
32
+ te = "tedit.__main__:main"
33
+ tedit = "tedit.__main__:main"
34
+
35
+ [build-system]
36
+ requires = ["setuptools>=77", "wheel", "build"]
37
+ build-backend = "setuptools.build_meta"
38
+
39
+ # If you use a src/ layout:
40
+ [tool.setuptools.packages.find]
41
+ where = ["src"]
tedit-0.9.0/setup.cfg ADDED
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,2 @@
1
+ __all__ = ["__version__"]
2
+ __version__ = "0.9.0"
@@ -0,0 +1,10 @@
1
+ from ._pip_only import enforce_pip_only
2
+ from . import __version__
3
+
4
+ def main():
5
+ enforce_pip_only("tedit")
6
+ from .app import run
7
+ run()
8
+
9
+ if __name__ == "__main__":
10
+ main()
@@ -0,0 +1,16 @@
1
+ import os, sys, pathlib
2
+ from importlib import metadata
3
+
4
+ def enforce_pip_only(package_name: str = "tedit") -> None:
5
+ here = pathlib.Path(__file__).resolve()
6
+ try:
7
+ dist = metadata.distribution(package_name)
8
+ dist_root = pathlib.Path(dist.locate_file(""))
9
+ if not str(here).startswith(str(dist_root)):
10
+ raise FileNotFoundError
11
+ except Exception:
12
+ sys.stderr.write(
13
+ "License notice: TE may be used only when installed via pip from the official PyPI package.\n"
14
+ f"Please run: pip install {package_name}\n"
15
+ )
16
+ sys.exit(1)