<commit_before># coding=utf-8
import setuptools

def package_data_dirs(source, sub_folders):
	import os
	dirs = []

	for d in sub_folders:
		for dirname, _, files in os.walk(os.path.join(source, d)):
			dirname = os.path.relpath(dirname, source)
			for f in files:
				dirs.append(os.path.join(dirname, f))

	return dirs

def params():
	name = "OctoPrint-Slic3r"
	version = "0.1"

	description = "Adds support for slicing via Slic3r from within OctoPrint"
	author = "<NAME>"
	author_email = "<EMAIL>"
	url = "http://octoprint.org"
	license = "AGPLv3"

	packages = ["octoprint_slic3r"]
	package_data = {"octoprint_slic3r": package_data_dirs('octoprint_slic3r', ['static', 'templates'])}

	include_package_data = True
	zip_safe = False
	install_requires = open("requirements.txt").read().split("\n")

	entry_points = {
		"octoprint.plugin": [
			"slic3r = octoprint_slic3r"
		]
	}

	return locals()

setuptools.setup(**params())
<commit_msg>Plugins now can specify some of their metadata now via setup.py and don't need to repeat it in __plugin_xyz__, changed implementation accordingly to utilize that<commit_after># coding=utf-8
import setuptools

def package_data_dirs(source, sub_folders):
	import os
	dirs = []

	for d in sub_folders:
		for dirname, _, files in os.walk(os.path.join(source, d)):
			dirname = os.path.relpath(dirname, source)
			for f in files:
				dirs.append(os.path.join(dirname, f))

	return dirs

def params():
	name = "OctoPrint-Slic3r"
	version = "0.1"

	description = "Adds support for slicing via Slic3r from within OctoPrint"
	author = "<NAME>"
	author_email = "<EMAIL>"
	url = "http://github.com/OctoPrint/OctoPrint-Slic3r"
	license = "AGPLv3"

	packages = ["octoprint_slic3r"]
	package_data = {"octoprint_slic3r": package_data_dirs('octoprint_slic3r', ['static', 'templates'])}

	include_package_data = True
	zip_safe = False
	install_requires = open("requirements.txt").read().split("\n")

	entry_points = {
		"octoprint.plugin": [
			"slic3r = octoprint_slic3r"
		]
	}

	return locals()

setuptools.setup(**params())

{'fraction_non_alphanumeric': 0.13463414634146342, 'fraction_numerical': 0.01121951219512195, 'mean_word_length': 4.713091922005571, 'pattern_counts': {'":': 4, '<': 7, '<?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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6751869', 'n_tokens_mistral': 813, 'n_tokens_neox': 768, 'n_words': 174}