Skip to content

Commit b9d6fb6

Browse files
authored
Merge pull request #34 from redcanari/fixing-windows-bugs
Fixing windows bugs
2 parents f83525a + e17389a commit b9d6fb6

23 files changed

Lines changed: 177 additions & 114 deletions

scripts/canari

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/usr/bin/env python
2+
3+
from canari.entrypoints import main
4+
5+
__author__ = 'Nadeem Douba'
6+
__copyright__ = 'Copyright 2012, Canari Project'
7+
__credits__ = []
8+
9+
__license__ = 'GPLv3'
10+
__version__ = '0.2'
11+
__maintainer__ = 'Nadeem Douba'
12+
__email__ = 'ndouba@gmail.com'
13+
__status__ = 'Development'
14+
15+
if __name__ == '__main__':
16+
main()

scripts/canari.bat

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
@%~dp0..\python.exe %~dp0canari %*

scripts/dispatcher

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/usr/bin/env python
2+
3+
from canari.entrypoints import dispatcher
4+
5+
__author__ = 'Nadeem Douba'
6+
__copyright__ = 'Copyright 2012, Canari Project'
7+
__credits__ = []
8+
9+
__license__ = 'GPLv3'
10+
__version__ = '0.1'
11+
__maintainer__ = 'Nadeem Douba'
12+
__email__ = 'ndouba@gmail.com'
13+
__status__ = 'Development'
14+
15+
16+
if __name__ == '__main__':
17+
dispatcher()

scripts/dispatcher.bat

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
@%~dp0..\python.exe %~dp0dispatcher %*

scripts/pysudo

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/usr/bin/env python
2+
3+
from canari.entrypoints import sudo
4+
5+
__author__ = 'Nadeem Douba'
6+
__copyright__ = 'Copyright 2012, Canari Project'
7+
__credits__ = []
8+
9+
__license__ = 'GPLv3'
10+
__version__ = '0.5'
11+
__maintainer__ = 'Nadeem Douba'
12+
__email__ = 'ndouba@gmail.com'
13+
__status__ = 'Development'
14+
15+
16+
if __name__ == '__main__':
17+
sudo()

setup.py

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#!/usr/bin/env python
22

33
import os
4+
import sys
45

56
from setuptools import setup, find_packages
67

@@ -71,17 +72,10 @@ def do_transform(self, request, response, config):
7172
long_description = open('README.rst').read()
7273

7374
scripts = [
74-
'src/scripts/canari',
75-
'src/scripts/dispatcher',
75+
'canari',
76+
'dispatcher'
7677
]
7778

78-
if os.name == 'posix':
79-
scripts.extend(
80-
[
81-
'src/scripts/pysudo'
82-
]
83-
)
84-
8579
extras = [
8680
'readline'
8781
]
@@ -100,26 +94,29 @@ def do_transform(self, request, response, config):
10094
'future'
10195
]
10296

103-
if os.name == 'nt':
97+
if sys.platform == 'win32':
10498
requires.append('pyreadline')
105-
scripts += ['%s.bat' % s for s in scripts]
99+
scripts.extend(['%s.bat' % s for s in scripts])
100+
else:
101+
scripts.append('pysudo')
106102

107103
setup(
108104
name='canari',
109105
author='Nadeem Douba',
110-
version='3.2.1',
106+
version='3.2.2',
111107
author_email='ndouba@gmail.com',
112108
description='Canari Framework - Maltego rapid transform development and execution framework.',
113109
long_description=long_description,
114110
license='GPLv3',
115111
packages=find_packages('src'),
116112
package_dir={'': 'src'},
117113
include_package_data=True,
118-
scripts=scripts,
114+
# scripts=scripts,
119115
zip_safe=False,
120116
install_requires=requires,
121117
dependency_links=[],
122118
url='https://github.com/redcanari/canari',
119+
scripts=[os.path.join('scripts', s) for s in scripts],
123120
classifiers=[
124121
'Development Status :: 5 - Production/Stable',
125122
'Environment :: Console',

src/TODO

Lines changed: 0 additions & 8 deletions
This file was deleted.

src/canari/__init__.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
__credits__ = []
44

55
__license__ = 'GPLv3'
6-
__version__ = '3.2.1'
6+
__version__ = '3.2.2'
77
__maintainer__ = 'Nadeem Douba'
88
__email__ = 'ndouba@gmail.com'
99
__status__ = 'Development'
@@ -17,6 +17,7 @@
1717
'framework',
1818
'mode',
1919
'resource',
20-
'tas'
20+
'tas',
21+
'entrypoints'
2122
]
2223

src/canari/commands/version.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,5 @@
2525
description='Show version of Canari framework that is currently active.'
2626
)
2727
def version(args):
28-
print('Your running *Canari Framework v%s*' % canari.__version__, file=sys.stderr)
28+
print('Canari Framework v%s' % canari.__version__, file=sys.stderr)
29+
print('Running on Python %s (%s)' % (sys.version, sys.executable))

src/canari/easygui.py

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
from past.builtins import cmp
2-
31
"""
42
@version: 0.96(2010-08-29)
53
@@ -35,14 +33,14 @@
3533
are permitted provided that the following conditions are met:
3634
3735
1. Redistributions of source code must retain the above copyright notice,
38-
this list of conditions and the following disclaimer.
39-
36+
this list of conditions and the following disclaimer.
37+
4038
2. Redistributions in binary form must reproduce the above copyright notice,
4139
this list of conditions and the following disclaimer in the documentation and/or
42-
other materials provided with the distribution.
43-
40+
other materials provided with the distribution.
41+
4442
3. The name of the author may not be used to endorse or promote products derived
45-
from this software without specific prior written permission.
43+
from this software without specific prior written permission.
4644
4745
THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS"
4846
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
@@ -68,7 +66,7 @@
6866
See http://www.gnu.org/licenses/license-list.html#GPLCompatibleLicenses
6967
7068
The BSD License is less restrictive than GPL.
71-
It allows software released under the license to be incorporated into proprietary products.
69+
It allows software released under the license to be incorporated into proprietary products.
7270
Works based on the software may be released under a proprietary license or as closed source software.
7371
http://en.wikipedia.org/wiki/BSD_licenses#3-clause_license_.28.22New_BSD_License.22.29
7472
@@ -100,6 +98,7 @@
10098
# , 'EgStore'
10199
]
102100

101+
from past.builtins import cmp
103102
import sys, os
104103
import string
105104
import pickle

0 commit comments

Comments
 (0)