forked from open-craft/xblock-html
-
Notifications
You must be signed in to change notification settings - Fork 3
Move to the modern pyproject.toml settings file #56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| [build-system] | ||
| requires = ["setuptools>=61.0", "setuptools-scm[toml]>=7"] | ||
| build-backend = "setuptools.build_meta" | ||
|
|
||
| [project] | ||
| name = "markdown-xblock" | ||
| dynamic = ["version"] | ||
| dependencies = [ | ||
| "XBlock>=5.2,<5.3", | ||
| "markdown2>=2.3.9", | ||
| "Pygments>=2.0.1", | ||
| "lxml-html-clean>=0.4.3" | ||
| ] | ||
| requires-python = ">=3.11" | ||
| description = "Markdown XBlock provides editing course content in Markdown." | ||
| readme = {file = "README.md", content-type = "text/markdown"} | ||
| license = "AGPL-3.0-only" | ||
| license-files = ["LICENSE"] | ||
| classifiers = [ | ||
| "Development Status :: 4 - Beta", | ||
| "Framework :: Django", | ||
| "Intended Audience :: Education", | ||
| "Topic :: Education :: Computer Aided Instruction (CAI)", | ||
| "Topic :: Education", | ||
| ] | ||
|
|
||
| [project.urls] | ||
| Repository = "https://github.com/cleura/markdown-xblock" | ||
|
|
||
| [project.entry-points."xblock.v1"] | ||
| markdown = "markdown_xblock:MarkdownXBlock" | ||
|
|
||
| [tool.setuptools_scm] | ||
|
|
||
| [tool.setuptools] | ||
| packages = { find = {} } | ||
|
|
||
| [tool.setuptools.package-data] | ||
| markdown_xblock = [ | ||
| "static/**", | ||
| "public/**" | ||
| ] | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,59 +1,6 @@ | ||
| """Setup for Markdown XBlock.""" | ||
|
|
||
| import os | ||
| #!/usr/bin/env python | ||
| """Setup for hastexo XBlock.""" | ||
|
|
||
| from setuptools import setup | ||
|
|
||
|
|
||
| def package_data(pkg, roots): | ||
| """Generic function to find package_data. | ||
|
|
||
| All of the files under each of the `roots` will be declared as package | ||
| data for package `pkg`. | ||
|
|
||
| """ | ||
| data = [] | ||
| for root in roots: | ||
| for dirname, _, files in os.walk(os.path.join(pkg, root)): | ||
| for fname in files: | ||
| data.append(os.path.relpath(os.path.join(dirname, fname), pkg)) | ||
|
|
||
| return {pkg: data} | ||
|
|
||
|
|
||
| setup( | ||
| name='markdown-xblock', | ||
| use_scm_version=True, | ||
| description='Markdown XBlock provides editing course content in Markdown.', | ||
| long_description=open('README.md').read(), | ||
| long_description_content_type='text/markdown', | ||
| url='https://github.com/cleura/markdown-xblock', | ||
| license='AGPL-3.0', | ||
| classifiers=[ | ||
| 'Development Status :: 4 - Beta', | ||
| 'Framework :: Django', | ||
| 'Intended Audience :: Education', | ||
| 'License :: OSI Approved :: GNU Affero General Public License v3', | ||
| 'Topic :: Education :: Computer Aided Instruction (CAI)', | ||
| 'Topic :: Education', | ||
| ], | ||
| packages=[ | ||
| 'markdown_xblock', | ||
| ], | ||
| python_requires='>=3.11', | ||
| install_requires=[ | ||
| 'XBlock>=5.2,<5.3', | ||
| 'markdown2>=2.3.9', | ||
| 'Pygments>=2.0.1', | ||
| 'lxml-html-clean>=0.4.3' | ||
| ], | ||
| setup_requires=[ | ||
| 'setuptools-scm', | ||
| ], | ||
| entry_points={ | ||
| 'xblock.v1': [ | ||
| 'markdown = markdown_xblock:MarkdownXBlock' | ||
| ] | ||
| }, | ||
| package_data=package_data("markdown_xblock", ["static", "public"]), | ||
| ) | ||
| setup() |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it correct to assume that including this section causes the package to behave the same way it would with
setup(use_scm_version=True)?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, exactly.