<commit_before>from distutils.core import setup
import sys
from setuptools.command.install import install
import ctypes, os
import json
from os.path import expanduser

class PostInstallScript(install):

	def run(self):
		install.run(self)

		nativeMessagingManifest = {
			'name': 'com.dutzi.chromeproxy',
			'description': 'Extends the Developer Tools, lets you locally edit files served from the web using Mitmproxy.', 
			'path': '/usr/local/bin/chromeproxy',
			'type': 'stdio',
			'allowed_origins': [
				'chrome-extension://bkblajiolelpgnnnclnjkcpmlbnanpkf/',
				'chrome-extension://kahmkopaahagafjemjkpoejeohdgejfi/'
			]
		}

		try:
			is_admin = os.getuid() == 0
		except AttributeError:
			is_admin = ctypes.windll.shell32.IsUserAnAdmin() != 0

		manifestFilename = expanduser('~/Library/Application Support/Google/Chrome/NativeMessagingHosts/')
		if not os.path.isdir(manifestFilename):
		    os.mkdir(manifestFilename)

		manifestFilename = manifestFilename + 'com.dutzi.chromeproxy.json'
		print '\nWriting chrome native messaging manifest file (' + manifestFilename + ')'
		print sys.prefix

		manifestFile = open(manifestFilename, 'w')
		json.dump(nativeMessagingManifest, manifestFile, sort_keys=True, indent=4)
		manifestFile.close()

setup(
    name = 'chrome-proxy',
    version = '0.1',
    description = 'Mitmproxy extension, companion for Chrome Proxy. Locally edit files served from the web',
    packages = ['chromeproxy'],
    install_requires = ['gevent-websocket>=0.9.3'],
    scripts = ['chromeproxy/chromeproxy'],
    license = 'MIT License',
    url = 'http://dutzi.github.com/chrome-proxy',
    author = 'dutzi',
    author_email = '<EMAIL>',
	cmdclass = {'install': PostInstallScript}
)<commit_msg>Changed version number<commit_after>from distutils.core import setup
import sys
from setuptools.command.install import install
import ctypes, os
import json
from os.path import expanduser

class PostInstallScript(install):

	def run(self):
		install.run(self)

		nativeMessagingManifest = {
			'name': 'com.dutzi.chromeproxy',
			'description': 'Extends the Developer Tools, lets you locally edit files served from the web using Mitmproxy.', 
			'path': '/usr/local/bin/chromeproxy',
			'type': 'stdio',
			'allowed_origins': [
				'chrome-extension://bkblajiolelpgnnnclnjkcpmlbnanpkf/',
				'chrome-extension://kahmkopaahagafjemjkpoejeohdgejfi/'
			]
		}

		try:
			is_admin = os.getuid() == 0
		except AttributeError:
			is_admin = ctypes.windll.shell32.IsUserAnAdmin() != 0

		manifestFilename = expanduser('~/Library/Application Support/Google/Chrome/NativeMessagingHosts/')
		if not os.path.isdir(manifestFilename):
		    os.mkdir(manifestFilename)

		manifestFilename = manifestFilename + 'com.dutzi.chromeproxy.json'
		print '\nWriting chrome native messaging manifest file (' + manifestFilename + ')'
		print sys.prefix

		manifestFile = open(manifestFilename, 'w')
		json.dump(nativeMessagingManifest, manifestFile, sort_keys=True, indent=4)
		manifestFile.close()

setup(
    name = 'chrome-proxy',
    version = '0.2',
    description = 'Mitmproxy extension, companion for Chrome Proxy. Locally edit files served from the web',
    packages = ['chromeproxy'],
    install_requires = ['gevent-websocket>=0.9.3'],
    scripts = ['chromeproxy/chromeproxy'],
    license = 'MIT License',
    url = 'http://dutzi.github.com/chrome-proxy',
    author = 'dutzi',
    author_email = '<EMAIL>',
	cmdclass = {'install': PostInstallScript}
)
{'fraction_non_alphanumeric': 0.12381226605240427, 'fraction_numerical': 0.005758710048949035, 'mean_word_length': 4.402799377916018, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5910448', 'n_tokens_mistral': 1249, 'n_tokens_neox': 1105, 'n_words': 250}