Referring to this excellent page: https://choosealicense.com/licenses/
The Apache License permits
- Commercial use
- Distribution
- Modification
- Patent use
- Private use
I am writing code to accompany a book. I intend to make the code available only to readers of the book - people who have purchased a copy of it. I want the readers to be able to use the code freely in their projects - commercial or non-commercial. The only restriction is that I don't want them to start redistributing the code - for example cloning the repository and putting it up on GitHub with their name on it - that would be plagiarism.
Is there a license that fits my requirements? Or is there a license with Apache terms minus the distribution?