Mercurial > hgrepos > Python > apps > py-cutils
annotate cutils/crcmod/__init__.py @ 318:0cc1e0de8fce v0.7
+++++ v0.7
| author | Franz Glasner <fzglas.hg@dom66.de> |
|---|---|
| date | Mon, 10 Mar 2025 10:35:34 +0100 |
| parents | 5c5c0c5a7402 |
| children |
| rev | line source |
|---|---|
|
180
d038f0a9ba49
Vendored crcmod2 into sub-package "cutils.crcmod" as pure-Python implementation of additional "digests": CRC sums.
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff
changeset
|
1 # -*- coding: utf-8; -*- |
|
186
5c5c0c5a7402
Sync with latest crcmod2
Franz Glasner <fzglas.hg@dom66.de>
parents:
180
diff
changeset
|
2 #----------------------------------------------------------------------------- |
|
5c5c0c5a7402
Sync with latest crcmod2
Franz Glasner <fzglas.hg@dom66.de>
parents:
180
diff
changeset
|
3 # Copyright (c) 2010 Raymond L. Buvel |
|
5c5c0c5a7402
Sync with latest crcmod2
Franz Glasner <fzglas.hg@dom66.de>
parents:
180
diff
changeset
|
4 # Copyright (c) 2010 Craig McQueen |
|
5c5c0c5a7402
Sync with latest crcmod2
Franz Glasner <fzglas.hg@dom66.de>
parents:
180
diff
changeset
|
5 # Copyright (c) 2025 Franz Glasner |
|
5c5c0c5a7402
Sync with latest crcmod2
Franz Glasner <fzglas.hg@dom66.de>
parents:
180
diff
changeset
|
6 # |
|
5c5c0c5a7402
Sync with latest crcmod2
Franz Glasner <fzglas.hg@dom66.de>
parents:
180
diff
changeset
|
7 # Permission is hereby granted, free of charge, to any person obtaining a copy |
|
5c5c0c5a7402
Sync with latest crcmod2
Franz Glasner <fzglas.hg@dom66.de>
parents:
180
diff
changeset
|
8 # of this software and associated documentation files (the "Software"), to deal |
|
5c5c0c5a7402
Sync with latest crcmod2
Franz Glasner <fzglas.hg@dom66.de>
parents:
180
diff
changeset
|
9 # in the Software without restriction, including without limitation the rights |
|
5c5c0c5a7402
Sync with latest crcmod2
Franz Glasner <fzglas.hg@dom66.de>
parents:
180
diff
changeset
|
10 # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
|
5c5c0c5a7402
Sync with latest crcmod2
Franz Glasner <fzglas.hg@dom66.de>
parents:
180
diff
changeset
|
11 # copies of the Software, and to permit persons to whom the Software is |
|
5c5c0c5a7402
Sync with latest crcmod2
Franz Glasner <fzglas.hg@dom66.de>
parents:
180
diff
changeset
|
12 # furnished to do so, subject to the following conditions: |
|
5c5c0c5a7402
Sync with latest crcmod2
Franz Glasner <fzglas.hg@dom66.de>
parents:
180
diff
changeset
|
13 # |
|
5c5c0c5a7402
Sync with latest crcmod2
Franz Glasner <fzglas.hg@dom66.de>
parents:
180
diff
changeset
|
14 # The above copyright notice and this permission notice shall be included in |
|
5c5c0c5a7402
Sync with latest crcmod2
Franz Glasner <fzglas.hg@dom66.de>
parents:
180
diff
changeset
|
15 # all copies or substantial portions of the Software. |
|
5c5c0c5a7402
Sync with latest crcmod2
Franz Glasner <fzglas.hg@dom66.de>
parents:
180
diff
changeset
|
16 # |
|
5c5c0c5a7402
Sync with latest crcmod2
Franz Glasner <fzglas.hg@dom66.de>
parents:
180
diff
changeset
|
17 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
|
5c5c0c5a7402
Sync with latest crcmod2
Franz Glasner <fzglas.hg@dom66.de>
parents:
180
diff
changeset
|
18 # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
|
5c5c0c5a7402
Sync with latest crcmod2
Franz Glasner <fzglas.hg@dom66.de>
parents:
180
diff
changeset
|
19 # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
|
5c5c0c5a7402
Sync with latest crcmod2
Franz Glasner <fzglas.hg@dom66.de>
parents:
180
diff
changeset
|
20 # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
|
5c5c0c5a7402
Sync with latest crcmod2
Franz Glasner <fzglas.hg@dom66.de>
parents:
180
diff
changeset
|
21 # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
|
5c5c0c5a7402
Sync with latest crcmod2
Franz Glasner <fzglas.hg@dom66.de>
parents:
180
diff
changeset
|
22 # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE |
|
5c5c0c5a7402
Sync with latest crcmod2
Franz Glasner <fzglas.hg@dom66.de>
parents:
180
diff
changeset
|
23 # SOFTWARE. |
|
5c5c0c5a7402
Sync with latest crcmod2
Franz Glasner <fzglas.hg@dom66.de>
parents:
180
diff
changeset
|
24 #----------------------------------------------------------------------------- |
|
5c5c0c5a7402
Sync with latest crcmod2
Franz Glasner <fzglas.hg@dom66.de>
parents:
180
diff
changeset
|
25 |
|
180
d038f0a9ba49
Vendored crcmod2 into sub-package "cutils.crcmod" as pure-Python implementation of additional "digests": CRC sums.
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff
changeset
|
26 from __future__ import absolute_import |
|
d038f0a9ba49
Vendored crcmod2 into sub-package "cutils.crcmod" as pure-Python implementation of additional "digests": CRC sums.
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff
changeset
|
27 |
|
d038f0a9ba49
Vendored crcmod2 into sub-package "cutils.crcmod" as pure-Python implementation of additional "digests": CRC sums.
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff
changeset
|
28 import sys |
|
d038f0a9ba49
Vendored crcmod2 into sub-package "cutils.crcmod" as pure-Python implementation of additional "digests": CRC sums.
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff
changeset
|
29 |
|
d038f0a9ba49
Vendored crcmod2 into sub-package "cutils.crcmod" as pure-Python implementation of additional "digests": CRC sums.
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff
changeset
|
30 if sys.version_info[0] < 3: |
|
d038f0a9ba49
Vendored crcmod2 into sub-package "cutils.crcmod" as pure-Python implementation of additional "digests": CRC sums.
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff
changeset
|
31 from .python2.crcmod import * |
|
d038f0a9ba49
Vendored crcmod2 into sub-package "cutils.crcmod" as pure-Python implementation of additional "digests": CRC sums.
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff
changeset
|
32 from .python2.crcmod import __doc__ |
|
d038f0a9ba49
Vendored crcmod2 into sub-package "cutils.crcmod" as pure-Python implementation of additional "digests": CRC sums.
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff
changeset
|
33 else: |
|
d038f0a9ba49
Vendored crcmod2 into sub-package "cutils.crcmod" as pure-Python implementation of additional "digests": CRC sums.
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff
changeset
|
34 from .python3.crcmod import * |
|
d038f0a9ba49
Vendored crcmod2 into sub-package "cutils.crcmod" as pure-Python implementation of additional "digests": CRC sums.
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff
changeset
|
35 from .python3.crcmod import __doc__ |
|
d038f0a9ba49
Vendored crcmod2 into sub-package "cutils.crcmod" as pure-Python implementation of additional "digests": CRC sums.
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff
changeset
|
36 |
|
d038f0a9ba49
Vendored crcmod2 into sub-package "cutils.crcmod" as pure-Python implementation of additional "digests": CRC sums.
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff
changeset
|
37 |
|
d038f0a9ba49
Vendored crcmod2 into sub-package "cutils.crcmod" as pure-Python implementation of additional "digests": CRC sums.
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff
changeset
|
38 __version__ = "1.7" |
|
d038f0a9ba49
Vendored crcmod2 into sub-package "cutils.crcmod" as pure-Python implementation of additional "digests": CRC sums.
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff
changeset
|
39 |
|
d038f0a9ba49
Vendored crcmod2 into sub-package "cutils.crcmod" as pure-Python implementation of additional "digests": CRC sums.
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff
changeset
|
40 |
|
d038f0a9ba49
Vendored crcmod2 into sub-package "cutils.crcmod" as pure-Python implementation of additional "digests": CRC sums.
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff
changeset
|
41 del sys |
