File: Rename-version.py-to-intbitset_version.py.patch

package info (click to toggle)
python-intbitset 4.0.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,432 kB
  • sloc: python: 704; ansic: 438; makefile: 133
file content (133 lines) | stat: -rw-r--r-- 5,015 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
From: Maximiliano Curia <maxy@gnuservers.com.ar>
Date: Fri, 11 Aug 2017 00:21:11 +0200
Subject: Rename version.py to intbitset_version.py

This is to avoid polluting the namespace
---
 docs/conf.py                   |  2 +-
 intbitset/intbitset.pyx        |  2 +-
 intbitset/intbitset_version.py | 29 +++++++++++++++++++++++++++++
 intbitset/version.py           | 29 -----------------------------
 setup.py                       |  4 ++--
 5 files changed, 33 insertions(+), 33 deletions(-)
 create mode 100644 intbitset/intbitset_version.py
 delete mode 100644 intbitset/version.py

diff --git a/docs/conf.py b/docs/conf.py
index c0336a1..12bc411 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -54,7 +54,7 @@ copyright = u'2013, 2014, 2015 CERN'
 # The short X.Y version.
 
 # Get the version string. Cannot be done with import!
-with open(os.path.join('..', 'intbitset', 'version.py'), 'rt') as f:
+with open(os.path.join('..', 'intbitset', 'intbitset_version.py'), 'rt') as f:
     version = re.search(
         '__version__\s*=\s*"(?P<version>.*)"\n',
         f.read()
diff --git a/intbitset/intbitset.pyx b/intbitset/intbitset.pyx
index 96837f4..36dc408 100644
--- a/intbitset/intbitset.pyx
+++ b/intbitset/intbitset.pyx
@@ -49,7 +49,7 @@ import six
 from array import array
 CFG_INTBITSET_ENABLE_SANITY_CHECKS = False
 from intbitset_helper import _
-from version import __version__
+from intbitset_version import __version__
 
 __all__ = ['intbitset', '__version__']
 
diff --git a/intbitset/intbitset_version.py b/intbitset/intbitset_version.py
new file mode 100644
index 0000000..93e1626
--- /dev/null
+++ b/intbitset/intbitset_version.py
@@ -0,0 +1,29 @@
+# -*- coding: utf-8 -*-
+#
+# This file is part of intbitset
+# Copyright (C) 2015, 2016 CERN.
+#
+# intbitset is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public License as
+# published by the Free Software Foundation; either version 3 of the
+# License, or (at your option) any later version.
+#
+# intbitset is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with intbitset; if not, write to the Free Software Foundation,
+# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
+#
+# In applying this licence, CERN does not waive the privileges and immunities
+# granted to it by virtue of its status as an Intergovernmental Organization
+# or submit itself to any jurisdiction.
+
+"""Version information for intbitset."""
+
+# Do not change the format of this next line. Doing so risks breaking
+# setup.py and docs/conf.py
+
+__version__ = "2.3.0"
diff --git a/intbitset/version.py b/intbitset/version.py
deleted file mode 100644
index 93e1626..0000000
--- a/intbitset/version.py
+++ /dev/null
@@ -1,29 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# This file is part of intbitset
-# Copyright (C) 2015, 2016 CERN.
-#
-# intbitset is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public License as
-# published by the Free Software Foundation; either version 3 of the
-# License, or (at your option) any later version.
-#
-# intbitset is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public License
-# along with intbitset; if not, write to the Free Software Foundation,
-# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
-#
-# In applying this licence, CERN does not waive the privileges and immunities
-# granted to it by virtue of its status as an Intergovernmental Organization
-# or submit itself to any jurisdiction.
-
-"""Version information for intbitset."""
-
-# Do not change the format of this next line. Doing so risks breaking
-# setup.py and docs/conf.py
-
-__version__ = "2.3.0"
diff --git a/setup.py b/setup.py
index 6866014..c0efe63 100644
--- a/setup.py
+++ b/setup.py
@@ -28,7 +28,7 @@ import os
 import re
 
 # Get the version string. Cannot be done with import!
-with open(os.path.join('intbitset', 'version.py'), 'rt') as f:
+with open(os.path.join('intbitset', 'intbitset_version.py'), 'rt') as f:
     version = re.search(
         '__version__\s*=\s*"(?P<version>.*)"\n',
         f.read()
@@ -44,7 +44,7 @@ setup(
     description=__doc__,
     long_description=open('README.rst').read(),
     package_dir={'': 'intbitset'},
-    py_modules=['intbitset_helper', 'version'],
+    py_modules=['intbitset_helper', 'intbitset_version'],
     ext_modules=[
         Extension("intbitset",
                   ["intbitset/intbitset.c", "intbitset/intbitset_impl.c"],