summaryrefslogtreecommitdiffstats
path: root/tests/samples
diff options
context:
space:
mode:
Diffstat (limited to 'tests/samples')
-rw-r--r--tests/samples/EG_README.rst4
-rw-r--r--tests/samples/altdistname/package1/__init__.py6
-rw-r--r--tests/samples/altdistname/package1/data_dir/foo.sh2
-rw-r--r--tests/samples/altdistname/package1/foo.py1
-rw-r--r--tests/samples/altdistname/package1/subpkg/__init__.py0
-rw-r--r--tests/samples/altdistname/package1/subpkg/sp_data_dir/test.json1
-rw-r--r--tests/samples/altdistname/package1/subpkg2/__init__.py0
-rw-r--r--tests/samples/altdistname/pyproject.toml11
-rw-r--r--tests/samples/bad-description-ext.toml9
-rw-r--r--tests/samples/entrypoints_conflict/console_entry_points.txt2
-rw-r--r--tests/samples/entrypoints_conflict/package1/__init__.py6
-rw-r--r--tests/samples/entrypoints_conflict/package1/data_dir/foo.sh2
-rw-r--r--tests/samples/entrypoints_conflict/package1/foo.py1
-rw-r--r--tests/samples/entrypoints_conflict/package1/subpkg/__init__.py0
-rw-r--r--tests/samples/entrypoints_conflict/package1/subpkg/sp_data_dir/test.json1
-rw-r--r--tests/samples/entrypoints_conflict/package1/subpkg2/__init__.py0
-rw-r--r--tests/samples/entrypoints_conflict/pyproject.toml16
-rw-r--r--tests/samples/entrypoints_valid/package1/__init__.py6
-rw-r--r--tests/samples/entrypoints_valid/package1/data_dir/foo.sh2
-rw-r--r--tests/samples/entrypoints_valid/package1/foo.py1
-rw-r--r--tests/samples/entrypoints_valid/package1/subpkg/__init__.py0
-rw-r--r--tests/samples/entrypoints_valid/package1/subpkg/sp_data_dir/test.json1
-rw-r--r--tests/samples/entrypoints_valid/package1/subpkg2/__init__.py0
-rw-r--r--tests/samples/entrypoints_valid/pyproject.toml15
-rw-r--r--tests/samples/extras-dev-conflict.toml13
-rw-r--r--tests/samples/extras/module1.py3
-rw-r--r--tests/samples/extras/pyproject.toml13
-rw-r--r--tests/samples/invalid_classifier.toml14
-rw-r--r--tests/samples/invalid_version1.py3
-rw-r--r--tests/samples/missing-description-file.toml9
-rw-r--r--tests/samples/module1.py3
-rw-r--r--tests/samples/module1_ini/flit.ini5
-rw-r--r--tests/samples/module1_ini/module1.py3
-rw-r--r--tests/samples/module1_toml/EG_README.rst4
-rw-r--r--tests/samples/module1_toml/module1.py3
-rw-r--r--tests/samples/module1_toml/pyproject.toml12
-rw-r--r--tests/samples/module2.py5
-rw-r--r--tests/samples/module3/LICENSE1
-rw-r--r--tests/samples/module3/pyproject.toml10
-rw-r--r--tests/samples/module3/src/module3.py3
-rw-r--r--tests/samples/moduleunimportable.py8
-rw-r--r--tests/samples/modulewithconstructedversion.py4
-rw-r--r--tests/samples/modulewithlocalversion/modulewithlocalversion.py5
-rw-r--r--tests/samples/modulewithlocalversion/pyproject.toml10
-rw-r--r--tests/samples/my-description.rst1
-rw-r--r--tests/samples/no_docstring-pkg.toml12
-rw-r--r--tests/samples/no_docstring.py1
-rw-r--r--tests/samples/ns1-pkg-mod/ns1/module.py5
-rw-r--r--tests/samples/ns1-pkg-mod/pyproject.toml7
-rw-r--r--tests/samples/ns1-pkg/EG_README.rst4
-rw-r--r--tests/samples/ns1-pkg/ns1/pkg/__init__.py8
-rw-r--r--tests/samples/ns1-pkg/pyproject.toml10
-rw-r--r--tests/samples/ns1-pkg2/EG_README.rst4
-rw-r--r--tests/samples/ns1-pkg2/ns1/pkg2/__init__.py8
-rw-r--r--tests/samples/ns1-pkg2/pyproject.toml10
-rw-r--r--tests/samples/package1/my-description.rst1
-rw-r--r--tests/samples/package1/package1/__init__.py6
-rw-r--r--tests/samples/package1/package1/data_dir/foo.sh2
-rw-r--r--tests/samples/package1/package1/foo.py1
-rw-r--r--tests/samples/package1/package1/subpkg/__init__.py0
-rw-r--r--tests/samples/package1/package1/subpkg/sp_data_dir/test.json1
-rw-r--r--tests/samples/package1/package1/subpkg2/__init__.py0
-rw-r--r--tests/samples/package1/pyproject.toml13
-rw-r--r--tests/samples/package2/package2-pkg.ini8
-rw-r--r--tests/samples/package2/pyproject.toml12
-rw-r--r--tests/samples/package2/src/package2/__init__.py6
-rw-r--r--tests/samples/package2/src/package2/foo.py1
-rw-r--r--tests/samples/packageinsrc/pyproject.toml10
-rw-r--r--tests/samples/packageinsrc/src/module1.py3
-rw-r--r--tests/samples/pep517/module1.py3
-rw-r--r--tests/samples/pep517/pyproject.toml13
-rw-r--r--tests/samples/requires-dev.toml11
-rw-r--r--tests/samples/requires-envmark/module1.py3
-rw-r--r--tests/samples/requires-envmark/pyproject.toml12
-rw-r--r--tests/samples/requires-extra-envmark/module1.py3
-rw-r--r--tests/samples/requires-extra-envmark/pyproject.toml11
-rw-r--r--tests/samples/requires-requests.toml10
-rw-r--r--tests/samples/with_flit_ini/flit.ini9
-rw-r--r--tests/samples/with_flit_ini/package1/__init__.py6
-rw-r--r--tests/samples/with_flit_ini/package1/foo.py1
-rw-r--r--tests/samples/with_flit_ini/package1/subpkg/__init__.py0
-rw-r--r--tests/samples/with_flit_ini/some_entry_points.txt2
82 files changed, 436 insertions, 0 deletions
diff --git a/tests/samples/EG_README.rst b/tests/samples/EG_README.rst
new file mode 100644
index 0000000..a742974
--- /dev/null
+++ b/tests/samples/EG_README.rst
@@ -0,0 +1,4 @@
+This is an example long description for tests to load.
+
+This file is `valid reStructuredText
+<http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html>`_.
diff --git a/tests/samples/altdistname/package1/__init__.py b/tests/samples/altdistname/package1/__init__.py
new file mode 100644
index 0000000..07978d8
--- /dev/null
+++ b/tests/samples/altdistname/package1/__init__.py
@@ -0,0 +1,6 @@
+"""A sample package"""
+
+__version__ = '0.1'
+
+def main():
+ print("package1 main")
diff --git a/tests/samples/altdistname/package1/data_dir/foo.sh b/tests/samples/altdistname/package1/data_dir/foo.sh
new file mode 100644
index 0000000..92abcfb
--- /dev/null
+++ b/tests/samples/altdistname/package1/data_dir/foo.sh
@@ -0,0 +1,2 @@
+#!/bin/sh
+echo "Example data file"
diff --git a/tests/samples/altdistname/package1/foo.py b/tests/samples/altdistname/package1/foo.py
new file mode 100644
index 0000000..1337a53
--- /dev/null
+++ b/tests/samples/altdistname/package1/foo.py
@@ -0,0 +1 @@
+a = 1
diff --git a/tests/samples/altdistname/package1/subpkg/__init__.py b/tests/samples/altdistname/package1/subpkg/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/samples/altdistname/package1/subpkg/__init__.py
diff --git a/tests/samples/altdistname/package1/subpkg/sp_data_dir/test.json b/tests/samples/altdistname/package1/subpkg/sp_data_dir/test.json
new file mode 100644
index 0000000..f77d03c
--- /dev/null
+++ b/tests/samples/altdistname/package1/subpkg/sp_data_dir/test.json
@@ -0,0 +1 @@
+{"example": true}
diff --git a/tests/samples/altdistname/package1/subpkg2/__init__.py b/tests/samples/altdistname/package1/subpkg2/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/samples/altdistname/package1/subpkg2/__init__.py
diff --git a/tests/samples/altdistname/pyproject.toml b/tests/samples/altdistname/pyproject.toml
new file mode 100644
index 0000000..c2d08ca
--- /dev/null
+++ b/tests/samples/altdistname/pyproject.toml
@@ -0,0 +1,11 @@
+[build-system]
+requires = ["flit_core >=2,<4"]
+build-backend = "flit_core.buildapi"
+
+[tool.flit.metadata]
+module = "package1"
+author = "Sir Robin"
+author-email = "robin@camelot.uk"
+home-page = "http://github.com/sirrobin/package1"
+dist-name = "package-Dist1"
+
diff --git a/tests/samples/bad-description-ext.toml b/tests/samples/bad-description-ext.toml
new file mode 100644
index 0000000..1062829
--- /dev/null
+++ b/tests/samples/bad-description-ext.toml
@@ -0,0 +1,9 @@
+[build-system]
+requires = ["flit"]
+
+[tool.flit.metadata]
+module = "module1"
+author = "Sir Robin"
+author-email = "robin@camelot.uk"
+home-page = "http://github.com/sirrobin/module1"
+description-file = "module1.py" # WRONG
diff --git a/tests/samples/entrypoints_conflict/console_entry_points.txt b/tests/samples/entrypoints_conflict/console_entry_points.txt
new file mode 100644
index 0000000..eb47371
--- /dev/null
+++ b/tests/samples/entrypoints_conflict/console_entry_points.txt
@@ -0,0 +1,2 @@
+[console_scripts]
+foo=bar:baz \ No newline at end of file
diff --git a/tests/samples/entrypoints_conflict/package1/__init__.py b/tests/samples/entrypoints_conflict/package1/__init__.py
new file mode 100644
index 0000000..07978d8
--- /dev/null
+++ b/tests/samples/entrypoints_conflict/package1/__init__.py
@@ -0,0 +1,6 @@
+"""A sample package"""
+
+__version__ = '0.1'
+
+def main():
+ print("package1 main")
diff --git a/tests/samples/entrypoints_conflict/package1/data_dir/foo.sh b/tests/samples/entrypoints_conflict/package1/data_dir/foo.sh
new file mode 100644
index 0000000..92abcfb
--- /dev/null
+++ b/tests/samples/entrypoints_conflict/package1/data_dir/foo.sh
@@ -0,0 +1,2 @@
+#!/bin/sh
+echo "Example data file"
diff --git a/tests/samples/entrypoints_conflict/package1/foo.py b/tests/samples/entrypoints_conflict/package1/foo.py
new file mode 100644
index 0000000..1337a53
--- /dev/null
+++ b/tests/samples/entrypoints_conflict/package1/foo.py
@@ -0,0 +1 @@
+a = 1
diff --git a/tests/samples/entrypoints_conflict/package1/subpkg/__init__.py b/tests/samples/entrypoints_conflict/package1/subpkg/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/samples/entrypoints_conflict/package1/subpkg/__init__.py
diff --git a/tests/samples/entrypoints_conflict/package1/subpkg/sp_data_dir/test.json b/tests/samples/entrypoints_conflict/package1/subpkg/sp_data_dir/test.json
new file mode 100644
index 0000000..f77d03c
--- /dev/null
+++ b/tests/samples/entrypoints_conflict/package1/subpkg/sp_data_dir/test.json
@@ -0,0 +1 @@
+{"example": true}
diff --git a/tests/samples/entrypoints_conflict/package1/subpkg2/__init__.py b/tests/samples/entrypoints_conflict/package1/subpkg2/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/samples/entrypoints_conflict/package1/subpkg2/__init__.py
diff --git a/tests/samples/entrypoints_conflict/pyproject.toml b/tests/samples/entrypoints_conflict/pyproject.toml
new file mode 100644
index 0000000..506a4eb
--- /dev/null
+++ b/tests/samples/entrypoints_conflict/pyproject.toml
@@ -0,0 +1,16 @@
+[build-system]
+requires = ["flit_core >=2,<4"]
+build-backend = "flit_core.buildapi"
+
+[tool.flit.metadata]
+module = "package1"
+author = "Sir Robin"
+author-email = "robin@camelot.uk"
+home-page = "http://github.com/sirrobin/package1"
+
+# The sections below conflict
+[tool.flit.scripts]
+pkg_script = "package1:main"
+
+[tool.flit.entrypoints.console_scripts]
+foo = "bar:baz"
diff --git a/tests/samples/entrypoints_valid/package1/__init__.py b/tests/samples/entrypoints_valid/package1/__init__.py
new file mode 100644
index 0000000..07978d8
--- /dev/null
+++ b/tests/samples/entrypoints_valid/package1/__init__.py
@@ -0,0 +1,6 @@
+"""A sample package"""
+
+__version__ = '0.1'
+
+def main():
+ print("package1 main")
diff --git a/tests/samples/entrypoints_valid/package1/data_dir/foo.sh b/tests/samples/entrypoints_valid/package1/data_dir/foo.sh
new file mode 100644
index 0000000..92abcfb
--- /dev/null
+++ b/tests/samples/entrypoints_valid/package1/data_dir/foo.sh
@@ -0,0 +1,2 @@
+#!/bin/sh
+echo "Example data file"
diff --git a/tests/samples/entrypoints_valid/package1/foo.py b/tests/samples/entrypoints_valid/package1/foo.py
new file mode 100644
index 0000000..1337a53
--- /dev/null
+++ b/tests/samples/entrypoints_valid/package1/foo.py
@@ -0,0 +1 @@
+a = 1
diff --git a/tests/samples/entrypoints_valid/package1/subpkg/__init__.py b/tests/samples/entrypoints_valid/package1/subpkg/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/samples/entrypoints_valid/package1/subpkg/__init__.py
diff --git a/tests/samples/entrypoints_valid/package1/subpkg/sp_data_dir/test.json b/tests/samples/entrypoints_valid/package1/subpkg/sp_data_dir/test.json
new file mode 100644
index 0000000..f77d03c
--- /dev/null
+++ b/tests/samples/entrypoints_valid/package1/subpkg/sp_data_dir/test.json
@@ -0,0 +1 @@
+{"example": true}
diff --git a/tests/samples/entrypoints_valid/package1/subpkg2/__init__.py b/tests/samples/entrypoints_valid/package1/subpkg2/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/samples/entrypoints_valid/package1/subpkg2/__init__.py
diff --git a/tests/samples/entrypoints_valid/pyproject.toml b/tests/samples/entrypoints_valid/pyproject.toml
new file mode 100644
index 0000000..d89da6a
--- /dev/null
+++ b/tests/samples/entrypoints_valid/pyproject.toml
@@ -0,0 +1,15 @@
+[build-system]
+requires = ["flit_core >=2,<4"]
+build-backend = "flit_core.buildapi"
+
+[tool.flit.metadata]
+module = "package1"
+author = "Sir Robin"
+author-email = "robin@camelot.uk"
+home-page = "http://github.com/sirrobin/package1"
+
+[tool.flit.scripts]
+pkg_script = "package1:main"
+
+[tool.flit.entrypoints.myplugins]
+package1 = "package1:main"
diff --git a/tests/samples/extras-dev-conflict.toml b/tests/samples/extras-dev-conflict.toml
new file mode 100644
index 0000000..0fe249d
--- /dev/null
+++ b/tests/samples/extras-dev-conflict.toml
@@ -0,0 +1,13 @@
+[build-system]
+requires = ["flit"]
+
+[tool.flit.metadata]
+module = "module1"
+author = "Sir Robin"
+author-email = "robin@camelot.uk"
+home-page = "http://github.com/sirrobin/module1"
+description-file = "EG_README.rst"
+dev-requires = ["apackage"]
+
+[tool.flit.metadata.requires-extra]
+dev = ["anotherpackage"]
diff --git a/tests/samples/extras/module1.py b/tests/samples/extras/module1.py
new file mode 100644
index 0000000..87f0370
--- /dev/null
+++ b/tests/samples/extras/module1.py
@@ -0,0 +1,3 @@
+"""Example module"""
+
+__version__ = '0.1'
diff --git a/tests/samples/extras/pyproject.toml b/tests/samples/extras/pyproject.toml
new file mode 100644
index 0000000..557ba2a
--- /dev/null
+++ b/tests/samples/extras/pyproject.toml
@@ -0,0 +1,13 @@
+[build-system]
+requires = ["flit"]
+
+[tool.flit.metadata]
+module = "module1"
+author = "Sir Robin"
+author-email = "robin@camelot.uk"
+home-page = "http://github.com/sirrobin/module1"
+requires = ["toml"]
+
+[tool.flit.metadata.requires-extra]
+test = ["pytest"]
+custom = ["requests"]
diff --git a/tests/samples/invalid_classifier.toml b/tests/samples/invalid_classifier.toml
new file mode 100644
index 0000000..931d72f
--- /dev/null
+++ b/tests/samples/invalid_classifier.toml
@@ -0,0 +1,14 @@
+[build-system]
+requires = ["flit_core >=2,<4"]
+build-backend = "flit_core.buildapi"
+
+[tool.flit.metadata]
+module = "package1"
+author = "Sir Robin"
+author-email = "robin@camelot.uk"
+description-file = "my-description.rst"
+home-page = "http://github.com/sirrobin/package1"
+classifiers = [
+ "License :: OSI Approved :: BSD License",
+ "Intended Audience :: Pacman",
+]
diff --git a/tests/samples/invalid_version1.py b/tests/samples/invalid_version1.py
new file mode 100644
index 0000000..dd3268a
--- /dev/null
+++ b/tests/samples/invalid_version1.py
@@ -0,0 +1,3 @@
+"""Sample module with invalid __version__ string"""
+
+__version__ = "not starting with a number" \ No newline at end of file
diff --git a/tests/samples/missing-description-file.toml b/tests/samples/missing-description-file.toml
new file mode 100644
index 0000000..00fae72
--- /dev/null
+++ b/tests/samples/missing-description-file.toml
@@ -0,0 +1,9 @@
+[build-system]
+requires = ["flit"]
+
+[tool.flit.metadata]
+module = "missingdescriptionfile"
+author = "Sir Robin"
+author-email = "robin@camelot.uk"
+home-page = "http://github.com/sirrobin/missingdescriptionfile"
+description-file = "definitely-missing.rst"
diff --git a/tests/samples/module1.py b/tests/samples/module1.py
new file mode 100644
index 0000000..87f0370
--- /dev/null
+++ b/tests/samples/module1.py
@@ -0,0 +1,3 @@
+"""Example module"""
+
+__version__ = '0.1'
diff --git a/tests/samples/module1_ini/flit.ini b/tests/samples/module1_ini/flit.ini
new file mode 100644
index 0000000..9bbfc4e
--- /dev/null
+++ b/tests/samples/module1_ini/flit.ini
@@ -0,0 +1,5 @@
+[metadata]
+module=module1
+author=Sir Robin
+author-email=robin@camelot.uk
+home-page=http://github.com/sirrobin/module1
diff --git a/tests/samples/module1_ini/module1.py b/tests/samples/module1_ini/module1.py
new file mode 100644
index 0000000..87f0370
--- /dev/null
+++ b/tests/samples/module1_ini/module1.py
@@ -0,0 +1,3 @@
+"""Example module"""
+
+__version__ = '0.1'
diff --git a/tests/samples/module1_toml/EG_README.rst b/tests/samples/module1_toml/EG_README.rst
new file mode 100644
index 0000000..a742974
--- /dev/null
+++ b/tests/samples/module1_toml/EG_README.rst
@@ -0,0 +1,4 @@
+This is an example long description for tests to load.
+
+This file is `valid reStructuredText
+<http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html>`_.
diff --git a/tests/samples/module1_toml/module1.py b/tests/samples/module1_toml/module1.py
new file mode 100644
index 0000000..87f0370
--- /dev/null
+++ b/tests/samples/module1_toml/module1.py
@@ -0,0 +1,3 @@
+"""Example module"""
+
+__version__ = '0.1'
diff --git a/tests/samples/module1_toml/pyproject.toml b/tests/samples/module1_toml/pyproject.toml
new file mode 100644
index 0000000..740ec87
--- /dev/null
+++ b/tests/samples/module1_toml/pyproject.toml
@@ -0,0 +1,12 @@
+[build-system]
+requires = ["flit"]
+
+[tool.flit.metadata]
+module = "module1"
+author = "Sir Robin"
+author-email = "robin@camelot.uk"
+home-page = "http://github.com/sirrobin/module1"
+description-file = "EG_README.rst"
+
+[tool.flit.metadata.urls]
+Documentation = "https://example.com/module1"
diff --git a/tests/samples/module2.py b/tests/samples/module2.py
new file mode 100644
index 0000000..cc83e39
--- /dev/null
+++ b/tests/samples/module2.py
@@ -0,0 +1,5 @@
+"""
+Docstring formatted like this.
+"""
+
+__version__ = '7.0'
diff --git a/tests/samples/module3/LICENSE b/tests/samples/module3/LICENSE
new file mode 100644
index 0000000..dfd033f
--- /dev/null
+++ b/tests/samples/module3/LICENSE
@@ -0,0 +1 @@
+Dummy license - check that it gets packaged
diff --git a/tests/samples/module3/pyproject.toml b/tests/samples/module3/pyproject.toml
new file mode 100644
index 0000000..95d8a80
--- /dev/null
+++ b/tests/samples/module3/pyproject.toml
@@ -0,0 +1,10 @@
+[build-system]
+requires = ["flit_core >=2,<4"]
+build-backend = "flit_core.buildapi"
+
+[tool.flit.metadata]
+module = "module3"
+author = "Sir Robin"
+author-email = "robin@camelot.uk"
+home-page = "http://github.com/sirrobin/module3"
+
diff --git a/tests/samples/module3/src/module3.py b/tests/samples/module3/src/module3.py
new file mode 100644
index 0000000..87f0370
--- /dev/null
+++ b/tests/samples/module3/src/module3.py
@@ -0,0 +1,3 @@
+"""Example module"""
+
+__version__ = '0.1'
diff --git a/tests/samples/moduleunimportable.py b/tests/samples/moduleunimportable.py
new file mode 100644
index 0000000..147d26e
--- /dev/null
+++ b/tests/samples/moduleunimportable.py
@@ -0,0 +1,8 @@
+
+"""
+A sample unimportable module
+"""
+
+raise ImportError()
+
+__version__ = "0.1"
diff --git a/tests/samples/modulewithconstructedversion.py b/tests/samples/modulewithconstructedversion.py
new file mode 100644
index 0000000..5d9ec93
--- /dev/null
+++ b/tests/samples/modulewithconstructedversion.py
@@ -0,0 +1,4 @@
+
+"""This module has a __version__ that requires runtime interpretation"""
+
+__version__ = ".".join(["1", "2", "3"])
diff --git a/tests/samples/modulewithlocalversion/modulewithlocalversion.py b/tests/samples/modulewithlocalversion/modulewithlocalversion.py
new file mode 100644
index 0000000..4d11be9
--- /dev/null
+++ b/tests/samples/modulewithlocalversion/modulewithlocalversion.py
@@ -0,0 +1,5 @@
+"""
+A module with a local version specifier
+"""
+
+__version__ = "0.1.dev0+test"
diff --git a/tests/samples/modulewithlocalversion/pyproject.toml b/tests/samples/modulewithlocalversion/pyproject.toml
new file mode 100644
index 0000000..bb80669
--- /dev/null
+++ b/tests/samples/modulewithlocalversion/pyproject.toml
@@ -0,0 +1,10 @@
+[build-system]
+requires = ["flit_core >=2,<4"]
+build-backend = "flit_core.buildapi"
+
+[tool.flit.metadata]
+module = "modulewithlocalversion"
+author = "Sir Robin"
+author-email = "robin@camelot.uk"
+home-page = "http://github.com/sirrobin/modulewithlocalversion"
+
diff --git a/tests/samples/my-description.rst b/tests/samples/my-description.rst
new file mode 100644
index 0000000..623cb1d
--- /dev/null
+++ b/tests/samples/my-description.rst
@@ -0,0 +1 @@
+Sample description for test.
diff --git a/tests/samples/no_docstring-pkg.toml b/tests/samples/no_docstring-pkg.toml
new file mode 100644
index 0000000..b68827f
--- /dev/null
+++ b/tests/samples/no_docstring-pkg.toml
@@ -0,0 +1,12 @@
+[build-system]
+requires = ["flit"]
+
+[tool.flit.metadata]
+module = "no_docstring"
+author = "Sir Robin"
+author-email = "robin@camelot.uk"
+home-page = "http://github.com/sirrobin/no_docstring"
+description-file = "EG_README.rst"
+
+[tool.flit.metadata.urls]
+Documentation = "https://example.com/no_docstring"
diff --git a/tests/samples/no_docstring.py b/tests/samples/no_docstring.py
new file mode 100644
index 0000000..29524eb
--- /dev/null
+++ b/tests/samples/no_docstring.py
@@ -0,0 +1 @@
+__version__ = '7.0'
diff --git a/tests/samples/ns1-pkg-mod/ns1/module.py b/tests/samples/ns1-pkg-mod/ns1/module.py
new file mode 100644
index 0000000..4e02147
--- /dev/null
+++ b/tests/samples/ns1-pkg-mod/ns1/module.py
@@ -0,0 +1,5 @@
+"""An example single file module in a namespace package
+"""
+
+__version__ = '0.1'
+
diff --git a/tests/samples/ns1-pkg-mod/pyproject.toml b/tests/samples/ns1-pkg-mod/pyproject.toml
new file mode 100644
index 0000000..215732a
--- /dev/null
+++ b/tests/samples/ns1-pkg-mod/pyproject.toml
@@ -0,0 +1,7 @@
+[build-system]
+requires = ["flit_core >=3.5,<4"]
+build-backend = "flit_core.buildapi"
+
+[project]
+name = "ns1.module"
+dynamic = ["version", "description"]
diff --git a/tests/samples/ns1-pkg/EG_README.rst b/tests/samples/ns1-pkg/EG_README.rst
new file mode 100644
index 0000000..a742974
--- /dev/null
+++ b/tests/samples/ns1-pkg/EG_README.rst
@@ -0,0 +1,4 @@
+This is an example long description for tests to load.
+
+This file is `valid reStructuredText
+<http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html>`_.
diff --git a/tests/samples/ns1-pkg/ns1/pkg/__init__.py b/tests/samples/ns1-pkg/ns1/pkg/__init__.py
new file mode 100644
index 0000000..445afbb
--- /dev/null
+++ b/tests/samples/ns1-pkg/ns1/pkg/__init__.py
@@ -0,0 +1,8 @@
+"""
+==================
+ns1.pkg
+==================
+"""
+
+__version__ = '0.1'
+
diff --git a/tests/samples/ns1-pkg/pyproject.toml b/tests/samples/ns1-pkg/pyproject.toml
new file mode 100644
index 0000000..acbabb1
--- /dev/null
+++ b/tests/samples/ns1-pkg/pyproject.toml
@@ -0,0 +1,10 @@
+[build-system]
+requires = ["flit_core >=3.5,<4"]
+build-backend = "flit_core.buildapi"
+
+[tool.flit.metadata]
+module = "ns1.pkg"
+author = "Sir Robin"
+author-email = "robin@camelot.uk"
+home-page = "http://github.com/sirrobin/module1"
+description-file = "EG_README.rst"
diff --git a/tests/samples/ns1-pkg2/EG_README.rst b/tests/samples/ns1-pkg2/EG_README.rst
new file mode 100644
index 0000000..a742974
--- /dev/null
+++ b/tests/samples/ns1-pkg2/EG_README.rst
@@ -0,0 +1,4 @@
+This is an example long description for tests to load.
+
+This file is `valid reStructuredText
+<http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html>`_.
diff --git a/tests/samples/ns1-pkg2/ns1/pkg2/__init__.py b/tests/samples/ns1-pkg2/ns1/pkg2/__init__.py
new file mode 100644
index 0000000..dbe87a4
--- /dev/null
+++ b/tests/samples/ns1-pkg2/ns1/pkg2/__init__.py
@@ -0,0 +1,8 @@
+"""
+==================
+ns1.pkg2
+==================
+"""
+
+__version__ = '0.1'
+
diff --git a/tests/samples/ns1-pkg2/pyproject.toml b/tests/samples/ns1-pkg2/pyproject.toml
new file mode 100644
index 0000000..d792a97
--- /dev/null
+++ b/tests/samples/ns1-pkg2/pyproject.toml
@@ -0,0 +1,10 @@
+[build-system]
+requires = ["flit_core >=3.5,<4"]
+build-backend = "flit_core.buildapi"
+
+[tool.flit.metadata]
+module = "ns1.pkg2"
+author = "Sir Robin"
+author-email = "robin@camelot.uk"
+home-page = "http://github.com/sirrobin/module1"
+description-file = "EG_README.rst"
diff --git a/tests/samples/package1/my-description.rst b/tests/samples/package1/my-description.rst
new file mode 100644
index 0000000..623cb1d
--- /dev/null
+++ b/tests/samples/package1/my-description.rst
@@ -0,0 +1 @@
+Sample description for test.
diff --git a/tests/samples/package1/package1/__init__.py b/tests/samples/package1/package1/__init__.py
new file mode 100644
index 0000000..07978d8
--- /dev/null
+++ b/tests/samples/package1/package1/__init__.py
@@ -0,0 +1,6 @@
+"""A sample package"""
+
+__version__ = '0.1'
+
+def main():
+ print("package1 main")
diff --git a/tests/samples/package1/package1/data_dir/foo.sh b/tests/samples/package1/package1/data_dir/foo.sh
new file mode 100644
index 0000000..92abcfb
--- /dev/null
+++ b/tests/samples/package1/package1/data_dir/foo.sh
@@ -0,0 +1,2 @@
+#!/bin/sh
+echo "Example data file"
diff --git a/tests/samples/package1/package1/foo.py b/tests/samples/package1/package1/foo.py
new file mode 100644
index 0000000..1337a53
--- /dev/null
+++ b/tests/samples/package1/package1/foo.py
@@ -0,0 +1 @@
+a = 1
diff --git a/tests/samples/package1/package1/subpkg/__init__.py b/tests/samples/package1/package1/subpkg/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/samples/package1/package1/subpkg/__init__.py
diff --git a/tests/samples/package1/package1/subpkg/sp_data_dir/test.json b/tests/samples/package1/package1/subpkg/sp_data_dir/test.json
new file mode 100644
index 0000000..f77d03c
--- /dev/null
+++ b/tests/samples/package1/package1/subpkg/sp_data_dir/test.json
@@ -0,0 +1 @@
+{"example": true}
diff --git a/tests/samples/package1/package1/subpkg2/__init__.py b/tests/samples/package1/package1/subpkg2/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/samples/package1/package1/subpkg2/__init__.py
diff --git a/tests/samples/package1/pyproject.toml b/tests/samples/package1/pyproject.toml
new file mode 100644
index 0000000..c4c4130
--- /dev/null
+++ b/tests/samples/package1/pyproject.toml
@@ -0,0 +1,13 @@
+[build-system]
+requires = ["flit_core >=2,<4"]
+build-backend = "flit_core.buildapi"
+
+[tool.flit.metadata]
+module = "package1"
+author = "Sir Robin"
+author-email = "robin@camelot.uk"
+description-file = "my-description.rst"
+home-page = "http://github.com/sirrobin/package1"
+
+[tool.flit.scripts]
+pkg_script = "package1:main"
diff --git a/tests/samples/package2/package2-pkg.ini b/tests/samples/package2/package2-pkg.ini
new file mode 100644
index 0000000..3b0864d
--- /dev/null
+++ b/tests/samples/package2/package2-pkg.ini
@@ -0,0 +1,8 @@
+[metadata]
+module=package2
+author=Sir Robin
+author-email=robin@camelot.uk
+home-page=http://github.com/sirrobin/package2
+
+[scripts]
+pkg_script=package2:main
diff --git a/tests/samples/package2/pyproject.toml b/tests/samples/package2/pyproject.toml
new file mode 100644
index 0000000..6119bbb
--- /dev/null
+++ b/tests/samples/package2/pyproject.toml
@@ -0,0 +1,12 @@
+[build-system]
+requires = ["flit_core >=2,<4"]
+build-backend = "flit_core.buildapi"
+
+[tool.flit.metadata]
+module = "package2"
+author = "Sir Robin"
+author-email = "robin@camelot.uk"
+home-page = "http://github.com/sirrobin/package2"
+
+[scripts]
+pkg_script = "package2:main"
diff --git a/tests/samples/package2/src/package2/__init__.py b/tests/samples/package2/src/package2/__init__.py
new file mode 100644
index 0000000..07978d8
--- /dev/null
+++ b/tests/samples/package2/src/package2/__init__.py
@@ -0,0 +1,6 @@
+"""A sample package"""
+
+__version__ = '0.1'
+
+def main():
+ print("package1 main")
diff --git a/tests/samples/package2/src/package2/foo.py b/tests/samples/package2/src/package2/foo.py
new file mode 100644
index 0000000..1337a53
--- /dev/null
+++ b/tests/samples/package2/src/package2/foo.py
@@ -0,0 +1 @@
+a = 1
diff --git a/tests/samples/packageinsrc/pyproject.toml b/tests/samples/packageinsrc/pyproject.toml
new file mode 100644
index 0000000..b70209f
--- /dev/null
+++ b/tests/samples/packageinsrc/pyproject.toml
@@ -0,0 +1,10 @@
+[build-system]
+requires = ["flit"]
+build-backend = "flit.buildapi"
+
+[tool.flit.metadata]
+module = "module1"
+author = "Sir Robin"
+author-email = "robin@camelot.uk"
+home-page = "http://github.com/sirrobin/module1"
+requires = []
diff --git a/tests/samples/packageinsrc/src/module1.py b/tests/samples/packageinsrc/src/module1.py
new file mode 100644
index 0000000..87f0370
--- /dev/null
+++ b/tests/samples/packageinsrc/src/module1.py
@@ -0,0 +1,3 @@
+"""Example module"""
+
+__version__ = '0.1'
diff --git a/tests/samples/pep517/module1.py b/tests/samples/pep517/module1.py
new file mode 100644
index 0000000..87f0370
--- /dev/null
+++ b/tests/samples/pep517/module1.py
@@ -0,0 +1,3 @@
+"""Example module"""
+
+__version__ = '0.1'
diff --git a/tests/samples/pep517/pyproject.toml b/tests/samples/pep517/pyproject.toml
new file mode 100644
index 0000000..6b4fa15
--- /dev/null
+++ b/tests/samples/pep517/pyproject.toml
@@ -0,0 +1,13 @@
+[build-system]
+requires = ["flit"]
+build-backend = "flit.buildapi"
+
+[tool.flit.metadata]
+module = "module1"
+author = "Sir Robin"
+author-email = "robin@camelot.uk"
+home-page = "http://github.com/sirrobin/module1"
+requires = [
+ "requests >= 2.18",
+ "docutils",
+]
diff --git a/tests/samples/requires-dev.toml b/tests/samples/requires-dev.toml
new file mode 100644
index 0000000..46e3170
--- /dev/null
+++ b/tests/samples/requires-dev.toml
@@ -0,0 +1,11 @@
+[build-system]
+requires = ["flit"]
+
+[tool.flit.metadata]
+module = "module1"
+author = "Sir Robin"
+author-email = "robin@camelot.uk"
+home-page = "http://github.com/sirrobin/module1"
+description-file = "EG_README.rst"
+# This should generate a warning tell you to use requires-extra.dev
+dev-requires = ["apackage"]
diff --git a/tests/samples/requires-envmark/module1.py b/tests/samples/requires-envmark/module1.py
new file mode 100644
index 0000000..87f0370
--- /dev/null
+++ b/tests/samples/requires-envmark/module1.py
@@ -0,0 +1,3 @@
+"""Example module"""
+
+__version__ = '0.1'
diff --git a/tests/samples/requires-envmark/pyproject.toml b/tests/samples/requires-envmark/pyproject.toml
new file mode 100644
index 0000000..e97c5f0
--- /dev/null
+++ b/tests/samples/requires-envmark/pyproject.toml
@@ -0,0 +1,12 @@
+[build-system]
+requires = ["flit"]
+
+[tool.flit.metadata]
+module = "module1"
+author = "Sir Robin"
+author-email = "robin@camelot.uk"
+home-page = "http://github.com/sirrobin/module1"
+requires = [
+ "requests",
+ "pathlib2; python_version == '2.7'",
+]
diff --git a/tests/samples/requires-extra-envmark/module1.py b/tests/samples/requires-extra-envmark/module1.py
new file mode 100644
index 0000000..87f0370
--- /dev/null
+++ b/tests/samples/requires-extra-envmark/module1.py
@@ -0,0 +1,3 @@
+"""Example module"""
+
+__version__ = '0.1'
diff --git a/tests/samples/requires-extra-envmark/pyproject.toml b/tests/samples/requires-extra-envmark/pyproject.toml
new file mode 100644
index 0000000..fe6975e
--- /dev/null
+++ b/tests/samples/requires-extra-envmark/pyproject.toml
@@ -0,0 +1,11 @@
+[build-system]
+requires = ["flit"]
+
+[tool.flit.metadata]
+module = "module1"
+author = "Sir Robin"
+author-email = "robin@camelot.uk"
+home-page = "http://github.com/sirrobin/module1"
+
+[tool.flit.metadata.requires-extra]
+test = ["pathlib2; python_version == \"2.7\""]
diff --git a/tests/samples/requires-requests.toml b/tests/samples/requires-requests.toml
new file mode 100644
index 0000000..bf26ac5
--- /dev/null
+++ b/tests/samples/requires-requests.toml
@@ -0,0 +1,10 @@
+[build-system]
+requires = ["flit"]
+
+[tool.flit.metadata]
+module = "module1"
+author = "Sir Robin"
+author-email = "robin@camelot.uk"
+home-page = "http://github.com/sirrobin/module1"
+description-file = "EG_README.rst"
+requires = ["requests"]
diff --git a/tests/samples/with_flit_ini/flit.ini b/tests/samples/with_flit_ini/flit.ini
new file mode 100644
index 0000000..0637840
--- /dev/null
+++ b/tests/samples/with_flit_ini/flit.ini
@@ -0,0 +1,9 @@
+[metadata]
+module=package1
+author=Sir Robin
+author-email=robin@camelot.uk
+home-page=http://github.com/sirrobin/package1
+entry-points-file=some_entry_points.txt
+
+[scripts]
+pkg_script=package1:main
diff --git a/tests/samples/with_flit_ini/package1/__init__.py b/tests/samples/with_flit_ini/package1/__init__.py
new file mode 100644
index 0000000..07978d8
--- /dev/null
+++ b/tests/samples/with_flit_ini/package1/__init__.py
@@ -0,0 +1,6 @@
+"""A sample package"""
+
+__version__ = '0.1'
+
+def main():
+ print("package1 main")
diff --git a/tests/samples/with_flit_ini/package1/foo.py b/tests/samples/with_flit_ini/package1/foo.py
new file mode 100644
index 0000000..1337a53
--- /dev/null
+++ b/tests/samples/with_flit_ini/package1/foo.py
@@ -0,0 +1 @@
+a = 1
diff --git a/tests/samples/with_flit_ini/package1/subpkg/__init__.py b/tests/samples/with_flit_ini/package1/subpkg/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/samples/with_flit_ini/package1/subpkg/__init__.py
diff --git a/tests/samples/with_flit_ini/some_entry_points.txt b/tests/samples/with_flit_ini/some_entry_points.txt
new file mode 100644
index 0000000..317be93
--- /dev/null
+++ b/tests/samples/with_flit_ini/some_entry_points.txt
@@ -0,0 +1,2 @@
+[myplugins]
+package1=package1:main \ No newline at end of file